Skip to main content

Using Claude Code, Cursor, or another coding agent? Paste this into your prompt to run cross-browser and real-device tests, debug sessions, and wire up CI on the TestMu AI cloud:
kane-cli testrun run executes many authored _test.md files as one execution — one summary, one exit code, and one sealed evidence pack for the whole suite.
Use testrun when you have a suite of committed tests to run together — nightly regression, pre-merge smoke, release gates. For a single test, kane-cli testmd run is all you need.

Selecting tests

Members come either from explicit paths (each must end in _test.md) or, when no paths are given, from a recursive walk of the current directory. Two filters then apply, in order:
  • --match <regex> — keep tests whose project-relative path matches the regex.
  • --tags <list> — keep tests whose tags: frontmatter matches any of the given tags (case-insensitive). Repeat the flag or pass a comma-separated list; --tags smoke,checkout and --tags smoke --tags checkout are equivalent.
Duplicates are removed and the final list runs in a stable order.

Preflight

Before anything runs, every member is checked:
  • (0.8.4) It need not be authored — a member with no recording classifies as an author member: the agent authors it during the run, and afterwards the authored and replayed evidence consolidates into one published execution (best-effort — when consolidation can’t complete, the evidence stays split rather than lost). Before 0.8.4, unauthored members failed preflight (missing_meta / not_authored).
  • All members must belong to one org and one project — a testrun is one execution in Test Manager, so it can’t span projects.
A member can fail preflight for these reasons: If any member fails preflight, the plan is invalid and nothing runs (exit 2). The offenders print to stderr:
Mobile is not supported in a batch run. A _test.md with a mobile target: (emulator / simulator) is rejected up front, before the suite runs. Run mobile tests one at a time with kane-cli testmd run <path>.

Running

Each worker gets its own isolated Chrome with a fresh temporary profile, so parallel members never share cookies, logins, or tabs — and never fight over your real browser profile. --on-failure controls what a failed member does to the rest of the suite:
  • continue (default) — every member runs; failures are collected in the summary.
  • fail-fast — a failure stops new members from starting; members already in flight finish normally.
Ctrl-C is graceful: no new members start, in-flight members finish, the evidence pack still seals, and the run exits 3. Members that never started are reported as skipped — the pack accounts for every planned member, including skipped and broken ones.

Dry runs

--dry-run prints exactly the plan the real run would execute — the selected members, any preflight failures, and the parallelism — then exits without launching anything:
Exit 0 means the plan is valid and a real run would proceed; exit 2 means it wouldn’t, and the offender list shows why. The dry run and the real run share the same planner, so they can never disagree.

Reading results

At the end of a run you get a suite summary — totals for passed / failed / broken / skipped members and the overall duration — plus one sealed evidence pack covering every member, created directly in .testmuai/evidence/. In a terminal, kane-cli offers to open the pack in the evidence viewer; in CI it prints the evidence serve hint instead. The pack is also published to your project’s execution history in Test Manager. --name sets the run’s title — useful for telling nightly runs apart in the dashboard.

Exit codes

Using testrun in CI

The exit code gates the pipeline, and .testmuai/evidence/*.evidence is a natural CI artifact — a single file per suite run that anyone can drop into the viewer. Full recipes: CI/CD.

For agents: NDJSON events

In agent / non-TTY mode, testrun run emits its own typed NDJSON events on stdout — testrun_plan, testrun_start, testrun_member_start, testrun_member_end, testrun_investigations_wait, testrun_evidence_ingest, testrun_summary, and finally the terminal testrun_done. Stop parsing at testrun_done. The full event schema ships with the kane-cli agent skill.

Next steps