Playwright File Test Runner
A simple Visual Studio Code extension that allows you to run a test by right-clicking one or more files in the file explorer view or by right-clicking an opened files tab, and then click 'Run Playwright Test' or 'Run Playwright Test with Repeats...'

Table of contents
- Install
- Settings
Install
Search the VS Code Marketplace for Playwright File Test Runner by AGS.

Or Ctrl+P and either copy/paste or type the following command, and press enter:
ext install playwright-file-test-runner
Settings
This extension has the following settings:

playwright-file-test-runner.packageManager: Package manager to use when running tests and Codegen. Set to auto (default) to detect automatically from your project's lock file or packageManager field in package.json. Supported values: auto, npm, pnpm, yarn, bun.
playwright-file-test-runner.configFile: The Playwright config file to use (e.g., playwright.config.ts). Suggestions are provided when editing settings.json.
playwright-file-test-runner.project: The Playwright project to run (e.g., chromium, firefox, webkit). Leave empty to run all projects specified in the config for that test file.
playwright-file-test-runner.repeatEach: Default number of times to repeat each test when prompted by 'Run Playwright Test with Repeats...' command. This value pre-fills the prompt and is updated by user input.
playwright-file-test-runner.codegen: Ctrl+Shift+P command - URL for Playwright Codegen (e.g., https://playwright.dev). If empty, Codegen starts without a URL.

Release Notes
1.2.0
Added automatic package manager detection. The extension now detects whether your project uses npm, pnpm, yarn, or bun by inspecting the packageManager field in package.json and lock files, and builds the Playwright command accordingly. A new playwright-file-test-runner.packageManager setting allows you to override detection explicitly. Falls back silently to npm if no package manager can be determined.
Extended file type support to include .spec.js and .test.js in addition to .spec.ts and .test.ts.
1.1.1
Added ability to run multiple selected tests from context menu.
1.1.0
Initial release of Playwright File Test Runner