Opening Cypress
Installing Cypress is the first step on the journey of writing end-to-end tests; now, we need to learn how to use the tools that Cypress provides to run the tests using both the graphical user interface and the dashboards. There are four ways to run the Cypress executable that has been installed on your machine. After opening Cypress, you should then see the Cypress test runner. No matter which way you open Cypress, the test runner dashboard that you are presented with is the same. The following sections detail the different ways to open and run Cypress.
Running with Npx
npx is used to execute npm package binaries and comes with all npm versions from version 5.2. Npx can also be installed using npm from npmjs.com
. To run Cypress using npx, you need to run the following command:
npx cypress open
Running with Yarn
If Cypress was installed using Yarn, you can then open Cypress using the following command:
Yarn run cypress open