Run Playwright BDD scenarios directly from .feature files in VS Code.
Playwright BDD Runner helps QA and automation engineers run tests faster, troubleshoot easier, and stay focused without leaving their Gherkin files.
See how easy it is to run and debug your scenarios.
(Tip: Keep each GIF under 15 seconds so users can quickly understand the flow.)
- 🎯 Precision Run: Execute the exact scenario at your cursor, or run the entire
.featurefile. - ⚡ Run at Cursor: Run a scenario or example row instantly using your default run mode.
- 🔄 Re-run Failed: Instantly retry failed tests from the last execution.
- 🧪 Native Integration: Fully supports VS Code's Testing Panel (including Scenario Outlines).
- 🖥️ Mode Toggle: Choose between Headless or Headed mode on the fly.
- 📊 Run Summary: See passed/failed counts and duration in the status bar after test runs.
- 📦 Package Manager Aware: Auto-detects
npm,yarn,pnpm, orbunfrom your project'spackageManagerfield or lockfile. - 🗂️ Monorepo Friendly: Runs commands from the nearest
package.jsonto the feature file, not the workspace root.
- VS Code version 1.90+
- Node.js v18+ recommended
- An active project configured with
playwrightandplaywright-bdd
- Open any
.featurefile in your Playwright + BDD project. - Place your cursor inside a
Scenario. - Open Command Palette (
Ctrl+Shift+P/Cmd+Shift+P) and run:Playwright BDD Runner: Run Scenario.
| Command | Description |
|---|---|
Playwright BDD Runner: Run Scenario |
Run scenario at cursor |
Playwright BDD Runner: Run at Cursor |
Run scenario or example row at cursor using default run mode |
Playwright BDD Runner: Run Feature |
Run all scenarios in active file |
Playwright BDD Runner: Re-run Failed |
Execute only failed tests |
Playwright BDD Runner: Stop |
Terminate active process |
Customize in settings.json:
| Setting | Default | Description |
|---|---|---|
bddScenarioRunner.packageManager |
auto |
Package manager (auto/npm/yarn/pnpm/bun). Auto-detects from packageManager field or lockfiles |
bddScenarioRunner.askRunMode |
true |
Show headless/headed prompt per run |
bddScenarioRunner.defaultRunMode |
headless |
Fallback if prompt is disabled |
bddScenarioRunner.autoClearTerminal |
true |
Clear terminal before execution |
bddScenarioRunner.terminalRunBehavior |
transient |
Terminal behavior (transient = auto-close per run, persistent = reuse terminal) |
bddScenarioRunner.forceShell |
auto |
Override default shell (e.g., pwsh) |
💡 Pro Tip: The default command templates use a
{pm}placeholder that resolves to the detected runner (npx/yarn/pnpm/bunx). You can override the templates directly if your workflow needs a custom invocation.
If you encounter any bugs, have feature requests, or need help setting up the runner, please feel free to reach out or contribute!
- Bug Reports & Feature Requests: Please open an issue on our 📁 GitHub Issues page.
- Contributions: Pull Requests are welcome! Feel free to fork the repo and submit your improvements.


