A Visual Studio Code extension that integrates Cypress tests into the native Test Explorer, giving you a familiar, first-class testing experience.
- Integrates with VS Code's built-in Testing sidebar — no custom panels to learn
- Automatically discovers
.cy.{ts,js,tsx,jsx}files across your workspace - Reads
specPatternfrom yourcypress.configfor projects with custom naming conventions - Run tests headlessly or Open in Cypress interactively, directly from Test Explorer
- Configure browser, paths, and environment variables from a settings panel in the Testing sidebar
- Separate management of OS-level env vars and Cypress
--envvars
- Install the extension from the VS Code Marketplace
- Open a project that contains Cypress test files (
.cy.ts,.cy.js,.cy.tsx, or.cy.jsx) - Open the Testing sidebar (beaker icon in the Activity Bar, or
Ctrl+Shift+T/Cmd+Shift+T) - Your tests appear automatically in the Test Explorer tree
- Click the play button next to any test file to run it headlessly (
cypress run) - Click the debug button to open it in Cypress interactive mode (
cypress open) - Use Run All at the top of the Test Explorer to run everything
Expand the Cypress Test Explorer section in the Testing sidebar to access all settings:
| Field | Purpose |
|---|---|
| Tests Directory | Folder to scan for test files (relative to workspace root) |
| Cypress Project | Directory containing your cypress.config file (passed as --project) |
| Config File | Only needed if the config file has a non-standard name or location |
| Cypress Command | Command to invoke Cypress (default: npx cypress) |
| Browser | Choose Chrome, Firefox, Edge, Electron, or let Cypress decide |
All fields are optional — the extension works out of the box for standard project structures.
Below the configuration section, you can manage:
- Environment Variables — OS-level variables passed to the Cypress process (e.g.,
CY_MOCK=1) - Cypress Env — Variables passed via
--envflag, accessed withCypress.env()in your tests
If your project uses a custom specPattern in cypress.config.ts (e.g., **/*.spec.ts instead of **/*.cy.ts), the extension reads it automatically and adjusts file discovery. When this happens, the config panel shows which patterns are active.
All settings are also accessible via the Command Palette (Cmd+Shift+P / Ctrl+Shift+P):
Cypress: Set Root FolderCypress: Set Project PathCypress: Set Executable CommandCypress: Update Run Variables
For projects where Cypress lives in a subdirectory (e.g., packages/cypress), configure:
- Tests Directory — where your
.cy.tsfiles are (e.g.,packages/cypress/cypress/tests) - Cypress Project — where
cypress.config.tslives (e.g.,packages/cypress)
- Visual Studio Code v1.73.0 or higher
- Node.js and npm installed
- Cypress installed in your project
See VSC Extension quickstart for setting up a development environment, running the extension in debug mode, and testing.
Please report issues on the GitHub repository.
- Fork the repository
- Create your feature branch (
git checkout -b feature/amazing-feature) - Commit your changes (
git commit -m 'Add some amazing feature') - Push to the branch (
git push origin feature/amazing-feature) - Open a Pull Request
This project is licensed under the MIT License - see the LICENSE file for details.