This article guides how users can install Cypress on their systems to started with test automation.
Cypress is a desktop-based application that is installed on your local computer system. The desktop-based application supports the below-operating systems:
If npm is used for installing the Cypress, then the user can use
$apt-get install libgtk2.0-0 libgtk-3-0 libgbm-dev libnotify-dev libgconf-2-4 libnss3 libxss1 libasound2 libxtst6 xauth xvfb
$ install -y xorg-x11-server-Xvfb gtk2-devel gtk3-devel libnotify-devel GConf2 nss libXScrnSaver alsa-lib
cd /your/project/path npm install cypress --save-dev
If you’re using npm to install, Cypress has now been installed to your ./node_modules system directory, with its binary executable accessible from
Now you can open Cypress from your project root directory by one of the following ways:
The long way with the full path
Or with the shortcut using npm bin
$(npm bin)/cypress open
Or by using npx
FYI: npx is included with npm > v5.2 or can be installed separately.
npx cypress open
Or by using yarn
yarn run cypress open
After taking sometime, the Cypress Test Runner will launch.
To run the Cypress tests, cypress provides a runner from which users can run the tests written in the editor. To run the Cypress runner, the user need to run the below commands in the terminal:
Run commands in Terminal for Cypress:
Code to run Cypress: ./node_modules/.bin/cypress open Headless mode run: /node_modules/.bin/cypress run To execute the cases in Cypress dashboard: ./node_modules/.bin/cypress run --record --key 3554230a-fdea-4f74-a835-63b2cfdf0b28
Once the user opens the runner, the user can click on the Testcase name to start executing the test case. Please see the below screen, a similar screen will be visible at your end:
The Cypress test runner will display all the features of the test on the left side console section of the Runner and the execution details on the right-hand side console. A few of the essential call-outs are:
This Service is a web-based component (optional) that provides various features related to projects and test runs in Cypress.
Below are some of the Features provided by Cypress Dashboard:
|Test Stats||Users can view the number and details of all failed, passed, pending, and skipped tests|
|Stack Trace||Users can view the complete stack trace of the failed test cases|
|View Screenshots||Users can view all the screenshots taken for the test cases during the test run.|
|View Video||Users can watch a complete video of the test run. Additionally, Users can also watch just a clip out of the entire test run.|
|Parallel Tests||Users can run multiple tests in parallel while running them on CI.|
|Grouping Tests||Users can group tests based on specific parameters and run them in one test run.|
|Cancel Test Runs||Users can cancel a specific test run from the Cypress Dashboard.|