@vue/cli-plugin-e2e-cypress

e2e-cypress plugin for vue-cli
2,487,314 29,510
Install
npm install @vue/cli-plugin-e2e-cypress
Latest Version:5.0.9
Vue:2
License:MIT
Last Updated:Aug 21, 2025
Links: GitHub  ·  npm
Maintainer: akryum

@vue/cli-plugin-e2e-cypress

e2e-cypress plugin for vue-cli

This adds E2E testing support using Cypress.

Cypress offers a rich interactive interface for running E2E tests in Firefox and Chromium based browsers (Chrome, MS Edge, Brave, Electron). To learn more about cross browser testing, visit the Cypress Cross Browser Testing Guide.

Note: If you have a hard requirement on E2E testing in IE or Safari, consider using the Selenium-based @vue/cli-plugin-e2e-nightwatch.

Injected Commands

  • vue-cli-service test:e2e

    Run e2e tests with cypress run.

    By default it launches Cypress in interactive mode with a GUI (via cypress open). If you want to run the tests in headless mode (e.g. for CI), you can do so with the --headless option.

    The command automatically starts a server in production mode to run the e2e tests against. If you want to run the tests multiple times without having to restart the server every time, you can start the server with vue-cli-service serve --mode production in one terminal, and then run e2e tests against that server using the --url option.

    Options:

    --headless run in headless mode without GUI
    --mode     specify the mode the dev server should run in. (default: production)
    --url      run e2e tests against given url instead of auto-starting dev server
    -s, --spec (headless only) runs a specific spec file. defaults to "all"
    

    Additionally:

    Examples :

    • Run Cypress in headless mode for a specific file: vue-cli-service test:e2e --headless --spec tests/e2e/specs/actions.spec.js

Configuration

We've pre-configured Cypress to place most of the e2e testing related files under <projectRoot>/tests/e2e. You can also check out how to configure Cypress via cypress.json.

Environment Variables

Cypress doesn't load .env files for your test files the same way as vue-cli does for your application code. Cypress supports a few ways to define env variables but the easiest one is to use .json files (either cypress.json or cypress.env.json) to define environment variables. Keep in mind those variables are accessible via Cypress.env function instead of regular process.env object.

Installing in an Already Created Project

vue add e2e-cypress

Related Packages

@fromage/cli-plugin-e2e-cypress

e2e-cypress plugin for vue-cli

2,230 29,511
@mingto/mt-cli

明途脚手架工具

2,568
cli
mgo-cli

create a vue3 webapp by demand

2,096
cli
@vue/babel-preset-app

babel-preset-app for vue-cli

30,515,167 29,510
@vue/cli-service

local service for vue-cli projects

29,737,870 29,510

Version History

Version Released License
5.0.9 MIT
5.0.8 MIT
5.0.7 MIT
5.0.6 MIT
5.0.5 MIT
Pre-releases (82)
Version Released License
5.0.0-rc.3 MIT
5.0.0-rc.2 MIT
5.0.0-rc.1 MIT
5.0.0-rc.0 MIT
5.0.0-beta.7 MIT