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.
Scope: all spec files in project
CLI equivalent: npx playwright test
Typical duration: 5-30 minutes depending on suite sizeSurgical Mode
Runs only the files or individual tests you select. You can scope at three levels:
| Level | Example | CLI Equivalent |
|---|---|---|
| Folder | tests/checkout/ | npx playwright test tests/checkout/ |
| File | login.spec.ts | npx 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:
- From Test Hub — check the boxes next to files or tests, then click Run Selected
- 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.
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 specsDependency 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 branchHEAD~3— compare against three commits agoauto— use the merge-base of the current branch andmain
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.
