run-tests

A test-running skill for the Browser4 software repository. It discovers and launches unit, integration, end-to-end, command-line, PowerShell, scenario, and production acceptance tests.

In plain words
What is it for?
Use it to run selected or all test suites, preview what would run, resume failures, launch the mock server, or check a production release.
Why use it?
It gathers the repository's different test types behind common commands and preserves results for later inspection.

Skill for Claude CodeCodex

Install

Getting it into your agent

One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.

agentmods
npx agentmods add skills/platonai/browser4/run-tests
Any agent
npx skills add platonai/Browser4 --skill run-tests
Clone the repo
git clone --depth 1 https://github.com/platonai/Browser4

Made for: Claude Code, Codex.

Per session 44 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 1,997 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. Scan, not verified.
Origin original No closer match found in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5 $0.00044 $0.01997
Opus 5 $0.00022 $0.00999
Sonnet 5 $0.00009 $0.00399
Haiku 4.5 $0.00004 $0.00200

Measured 2d ago against content hash 747630abd392, method: parsed. Prices are Anthropic first-party input rates as of 2026-08-30, from the pricing page.

Security

Grade A, and why

run-tests scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 2d ago.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Nothing flagged

None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.

coworker/skills/run-tests/SKILL.md · 229 lines

How it starts

The opening of the file, as written. The whole thing — 229 lines — stays where its author put it; the contents beside it link to each section on GitHub.

Run Tests

Two test entrypoints:

  • bin/test.ps1 — unified test orchestrator for the Browser4 monorepo. Supports Maven tests, Rust CLI tests, PowerShell *.tests.ps1 files, real-world scenario agent evaluations, and mock-server launch.

  • bin/test-production.ps1 — acceptance test for the latest production release of browser4-cli. Downloads, installs, exercises, uninstalls, and re-installs the global CLI from the public OSS distribution channel.

When to Use

  • "run the tests"
  • "run fast / unit tests"
  • "run integration / it tests"
  • "run e2e tests"
  • "run cli tests"
  • "run all PowerShell tests"
  • "run real-world scenarios"
  • "check what tests would run" (-DryRun / -Show)
  • "resume failed tests"
  • "launch mock server"
  • "run production acceptance test"
  • "acceptance test the latest release"

How It Works

bin/test.ps1 buckets test-type arguments into dispatch categories (Maven, CLI, PowerShell, RWS, server) and runs each in sequence. The script must be invoked from the repository root (it Set-Locations there automatically).

Test results are persisted per invocation to .test-sessions/<session-id>/test-session.json (see bin/common/test-session.psm1). Pass -NoSession to skip persistence or -SessionPath to write to a custom location.

Usage

./bin/test.ps1 [OPTIONS] [TEST-TYPES...] [EXTRA-ARGS...]

Options

Flag Description
-DryRun Compile only (test-compile), do not run tests
-Show Print the final command, do not execute anything
-NoSession Skip persisting test results to .test-sessions/
-SessionPath <path> Custom path for the test-session JSON file

Test Types

Type Category Description
fast Maven Fast unit tests
it Maven Integration tests (-DrunITs=true)
e2e Maven End-to-end tests (-DrunE2ETests=true)
rest Maven REST module tests (-DrunRestTests=true)
skills Maven Skills-focused agentic tests (browser4-agentic)
mcp Maven MCP-focused agentic tests (browser4-agentic)
main Maven All Browser4 main tests: fast + it + e2e + rest
cli CLI Rust Browser4 CLI tests (cargo test --test e2e). Alias: browser4-cli
ps PowerShell All *.tests.ps1 files in the project
resume Maven Resume from the last failed module (-rf)
mock-site Server Launch MockSiteBoot (aliases: server, mocksite)
rws RWS Real-world scenario agent evaluations. Bare rws shows help; pass --scenarios or --task to run.

Read the full file on GitHub · 229 lines

Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. 2d ago First seen · 229 lines · 44 tokens per session scan A 747630abd392

Subscribe to this mod's changes

run-tests is a skill published in the GitHub repository platonai/Browser4 (1,114 stars, last pushed 3d ago), licensed Apache-2.0. It adds 44 tokens to every session and 1,997 once invoked, about $0.0002 per session on Opus 5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-30.