Cypress TutorialsCypress.io

Cypress Tutorial | How To Install Cypress.io

To be able to start working with Cypress you need to install it first.
therefore you will need to make sure you already have installed on your computer:

IDE – my recommendation is VS Code (Visual Studio Code) it is free, you can download it from this link.

With the IDE you will write your Cypress Code.

Node.js – to be able to use NPM (node package manager) you can download it from this link.
I recommend installing the recommended version.

Installation

After you installed your favorite IDE and the node.js you can open the IDE
(for the demo I will use VScode).

Create a new folder anywhere you want to save your project.
Open the VScode and press In the top menu navigation press on the file tab -> open -> select your folder.

In the top menu navigation press on the Terminal tab -> New Terminal button

Now the screen split and we can start type in our new terminal.

The first command will be:

npm init

The “npm init” command will initialize a project and create the package.json file

Press enter until it will ask you Is this Ok? – type yes and enter

Then we will type:

npm install --save-dev cypress

The npm install downloads a package and all its dependencies.

This command will install Cypress locally as a dev dependency for your project.

Now you should be able to see that under your folder you now have the node_module, package-lock.json and package.json files.

Congratulations!

Now you have Cypress installed on your local computer and you can start writing your first automation test.

In the next article, we will go over all the cypress files and learn how to run our first test.

To read the next article click here – Cypress Tutorial | How To Run Your First Cypress Test

For all Cypress Tutorial articles please click here

Ofir Blumental

QA Automation Engineer - ofirblumental1@gmail.com

Related Articles

Leave a Reply

Your email address will not be published. Required fields are marked *

Back to top button