CLI Commands Reference

All pnpm scripts installed by the plugin after specwright init, plus every Claude Code slash command available in the pipeline.


BDD Test Scripts

CommandWhat it runs
pnpm test:bddFull suite: modules + workflows (recommended for CI)
pnpm test:bdd:allEverything including authentication tests
pnpm test:bdd:authAuthentication tests only (auth-tests project)
pnpm test:bdd:serial@serial-execution features only
pnpm test:bdd:workflowsAll workflows — precondition then consumers
pnpm test:bdd:workflowSingle workflow — pair with --grep @WorkflowTag
pnpm test:bdd:debugDebug mode with PWDEBUG=console

Report Scripts

CommandWhat it does
pnpm report:playwrightOpen the Playwright HTML report in a browser
pnpm report:bddGenerate the BDD Cucumber HTML report
pnpm report:bdd:openOpen the BDD Cucumber report in a browser
pnpm test:cleanRemove reports, .features-gen/, and all test-data/*.json files

Running with Filters

Always run bddgen before playwright test. The pnpm test:bdd family handles this automatically, but when using npx directly you must chain them.

# Filter by tag
pnpm bddgen && npx playwright test --project setup --project main-e2e --grep @LoginPage

# Filter by scenario title
pnpm bddgen && npx playwright test --project setup --project main-e2e -g "Successful login"

# Headed mode (visible browser window)
pnpm bddgen && npx playwright test --project setup --project main-e2e --grep @Tag --headed

# Single workflow
pnpm bddgen && npx playwright test \
  --project setup \
  --project precondition \
  --project workflow-consumers \
  --grep @MyWorkflow

Never run npx playwright test directly without bddgen. It will execute against stale compiled specs in .features-gen/ and silently pass or fail for the wrong reasons.


Claude Code Slash Commands

CommandDescription
/e2e-automateFull 10-phase pipeline — process, plan, validate, generate, heal, score
/e2e-plan [url]Browser exploration + test plan only (Phases 4–5)
/e2e-generate [plan-file]BDD generation only (Phase 7) — feature files + step implementations
/e2e-heal [@ModuleName]Run tests + auto-heal failures (Phases 8–9)
/e2e-runRun existing tests without the healing loop
/e2e-validateValidate generated feature files and produce quality score
/e2e-process [input]Convert Jira ticket, PDF, or plain text into a structured test plan
/e2e-desktop-automateFull pipeline via MCP — for Claude Desktop only

When to use each command

  • Starting fresh on a new module: /e2e-automate — runs everything end to end.
  • Re-exploring after UI changes: /e2e-plan [url] — refreshes selectors and plan without touching existing feature files.
  • Regenerating after plan edits: /e2e-generate [plan-file] — skips exploration, goes straight to BDD output.
  • Fixing a broken test suite: /e2e-heal @ModuleName — runs tests, diagnoses failures, applies fixes, retries.
  • Checking test quality: /e2e-validate — runs the scorer against the current feature files.
  • Processing a Jira ticket: /e2e-process https://your-org.atlassian.net/browse/PROJ-123 — extracts acceptance criteria and formats them as a plan.