CyJet is a Visual Studio Code extension designed to streamline your Cypress test execution workflow. It provides an intuitive interface for running Cypress tests directly from VS Code, with support for both GUI and headless modes.
Features
Spec File Search
Search and filter Cypress spec files directly from the sidebar
Real-time filtering as you type
Test Explorer
View all Cypress spec files in your project
Select individual spec files for targeted testing
Run selected tests with a single click
Browser Selection
Choose from multiple browsers for test execution:
Chrome
Firefox
Edge
Electron (default)
Run Mode Options
Run tests in headless mode (default)
Run tests in headed (GUI) mode
Environment Variables
Set custom environment variables for your Cypress tests
Variables are passed to Cypress using the --env flag
Support for multiple variables (one per line)
Cypress Configurations
Set custom Cypress configurations for your tests
Configurations are passed to Cypress using the --config flag
Support for multiple configurations (one per line)
Overrides values in your Cypress configuration file
Quick Actions
Run all tests in the project with a single click
Open the Cypress Runner GUI for interactive execution
Access Official Cypress documentation directly from VS Code
Installation
Open VS Code
Go to Extensions (Ctrl+Shift+X / Cmd+Shift+X)
Search for "CyJet"
Click Install
Requirements
Visual Studio Code 1.85.0 or higher
Node.js and npm installed
Cypress project folder is opened in VS Code
Usage
Open a Cypress project in VS Code
Click on the CyJet icon in the Activity Bar
Use the search bar to find specific spec files
Select the browser and run mode from the dropdown menus
(Optional) Enter environment variables in the textarea (one per line, in the format KEY=VALUE)
(Optional) Enter Cypress configurations in the textarea (one per line, in the format KEY=VALUE)
Select the spec files you want to run
Click the "Run Selected Tests" button to execute the tests
Running All Tests
To run all tests in your project:
Make sure no spec files are selected
Click the "Run All Tests" button
Using Environment Variables
You can set environment variables for your Cypress tests:
Enter each variable on a new line in the environment variables textarea