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, 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).
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.
Choose the desired environment from the prompt, and the test will run with the selected configuration.
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.
Set the default environment for running tests by right-clicking on an environment and selecting "Set Default Environment".
Customization:
Customize default environment configurations and default settings according to your project's requirements.
Use the provided commands and settings to tailor the extension to your testing workflow.
Accessing Settings:
Open the extension settings directly from the editor by executing the "Open Settings" command.
Modify environment configurations, default settings, and other preferences conveniently from within VS Code.