The Playwright Runner by Koushik VS Code extension simplifies the process of running Playwright tests directly from your editor. With this extension, you can easily execute Playwright tests & Cucumber tests, manage different test environments, and streamline your testing workflow without leaving VS Code.
Usage:
Installation:
Install the extension from the Visual Studio Code Marketplace by searching for "Playwright Runner by Koushik" and clicking on "Install".
Setting Up Environments:
Open your user settings (File > Preferences > Settings) and navigate to the extension settings under "Playwright Runner by Koushik".
Define your test environments and their corresponding configurations (e.g., development, staging, production).
Define your cucumber test commands with different environment names
Running Playwright Tests:
Navigate to your TypeScript or JavaScript test file containing Playwright tests.
The extension automatically detects test functions and suites and adds "Run Playwright Test" code lenses.
Click on the code lens next to a test to execute it.
Running Cucumber scenarios:
Navigate to your feature file
The extension automatically detects Scenario & Scenario Outline
Click on the code lens next to execute it
After clicking it will add the scenario name to the existing command that user already set
Managing Environments:
Access the environment selector from the "Playwright runner by Koushik" view in the Activity Bar.
View and select different environments from the tree view.