Skip to content

Execution Modes

The Runner supports three execution modes, each designed for a different stage of the development workflow.

All Tests

Runs every spec file in the project. This is the default mode and the equivalent of running npx playwright test without filters.

When to use: Full regression before a release, nightly CI runs, or baseline quality checks.

text
Scope: all spec files in project
CLI equivalent: npx playwright test
Typical duration: 5-30 minutes depending on suite size

Surgical Mode

Runs only the files or individual tests you select. You can scope at three levels:

LevelExampleCLI Equivalent
Foldertests/checkout/npx playwright test tests/checkout/
Filelogin.spec.tsnpx playwright test login.spec.ts
Test"should reject expired card"npx playwright test -g "should reject expired card"

Multi-Select

Hold Ctrl (or Cmd on macOS) to select multiple files or tests. The Runner concatenates them into a single execution command.

Selecting Tests

There are two entry points for Surgical mode:

  1. From Test Hub — check the boxes next to files or tests, then click Run Selected
  2. From Runner — type a file path or test title in the scope input field

Smart Run

Smart Run uses git diff to determine which files have changed since the last commit (or compared to a configurable base branch). It then resolves the dependency graph to find all affected test files.

text
Changed files:
  src/components/Cart.tsx
  src/utils/pricing.ts

Affected tests (resolved via import graph):
  tests/cart-add-item.spec.ts
  tests/cart-pricing.spec.ts
  tests/checkout-total.spec.ts

Skipped: 44 unaffected specs

Dependency Resolution

Smart Run uses the import graph from the Architecture module. If Architecture has not scanned the project yet, Smart Run falls back to file-name matching.

Configuring the Base Branch

By default, Smart Run diffs against the current branch's tracking remote. You can override this in Settings > Runner > Smart Run Base:

  • origin/main — compare against main branch
  • HEAD~3 — compare against three commits ago
  • auto — use the merge-base of the current branch and main

Mode Selection in the UI

The mode selector sits at the top of the Runner panel. Switching modes resets the scope but preserves browser selection and variable bindings.

Smart Run Requires Git

Smart Run is disabled if the project is not a Git repository or if there are no commits on the current branch.

Local-first QA orchestration.