CLI Reference
Command-line reference for npx donobu test, including all Donobu-specific flags and the heal subcommand.
The Donobu CLI wraps Playwright's own CLI, forwarding all standard Playwright arguments while adding Donobu-specific flags and subcommands.
Running tests
npx donobu test [playwright-args] [donobu-flags]
The test subcommand is optional — npx donobu [flags] is equivalent to npx donobu test [flags].
Every argument supported by npx playwright test is also supported here. Common examples:
# Run all tests
npx donobu test
# Run a specific test file
npx donobu test tests/checkout.test.ts
# Run tests matching a pattern
npx donobu test --grep "login"
# Run in headed mode
npx donobu test --headed
# Run with a specific Playwright project
npx donobu test --project=chromium
Refer to the Playwright CLI documentation for the full list of supported arguments.
Donobu-specific flags
These flags are consumed by Donobu before the remaining arguments are forwarded to Playwright.
--auto-heal
Enables automatic test healing. When a test fails, Donobu collects failure evidence, then re-runs the failing test with the AI enabled to regenerate the cached action sequence.
npx donobu test --auto-heal
See Self-Healing Tests for full details.
--clear-ai-cache
Invalidates the Page.AI cache for all page.ai() calls in the run. Forces the AI to re-execute every flow from scratch rather than replaying cached action sequences.
npx donobu test --clear-ai-cache
Useful when you want to verify that the AI can still complete all flows against the current state of the application.
--no-triage
Disables failure evidence collection. By default, Donobu captures screenshots, DOM snapshots, and AI-generated triage analyses when tests fail. Passing --no-triage skips this step, which can speed up runs where you know the failures are expected or irrelevant.
npx donobu test --no-triage
--triage-output-dir <path>
Overrides the directory where failure evidence and treatment plans are written. Defaults to <playwright-output-dir>/donobu-triage.
npx donobu test --triage-output-dir ./my-triage-output
# or
npx donobu test --triage-output-dir=./my-triage-output
The heal subcommand
npx donobu heal applies a previously generated treatment plan to attempt to repair a specific failing test without running the full test suite.
npx donobu heal --plan <path-to-plan.json> [-- playwright-args]
Arguments
| Argument | Description |
|---|---|
--plan <path> (required) | Path to the treatment plan JSON file generated during a previous triage run. The plan path can also be passed as a positional argument. |
--triage-output-dir <path> | Override the output directory for triage artifacts produced during the heal run |
-- [playwright-args] | Arguments after -- are forwarded directly to Playwright |
Example
# Apply a specific treatment plan
npx donobu heal --plan test-results/donobu-triage/treatment-plan-*.json
# Pass additional Playwright arguments
npx donobu heal --plan ./plan.json -- --headed --timeout=60000
Treatment plans are generated automatically in the triage output directory when tests fail and --no-triage is not set. Use --auto-heal during a normal test run to apply them automatically rather than running donobu heal manually.
Logging
By default, Donobu prints additional output alongside Playwright's normal output. To suppress it:
LOG_LEVEL=error npx donobu test