Install Cypress 10 from scratch
Cypress is a next-generation front-end testing tool built for the modern web.
Cypress makes it possible to:
- Install Node.js: https://nodejs.org/en/download/
- Create a new folder and name it whatever you want. ie: “cy10”
- Open the folder on your preferred code editor.
- Start a terminal inside that blank folder
- Run the following commands:
> npm init
> npm i cypress@latest --save-dev
5. Open the “package.json” file and add the following line into Scripts:
"cy:open": "cypress open"
6. Now, run the following command on your terminal to open Cypress for the first time:
> npm run cy:open
7. Cypress will open in a new window, click on the ‘E2E Testing’ card and follow the steps:
8. Finish the setup on Cypress, you’ll notice that your folder structure will be something similar to this:
9. Cypress runner ready to be used: