Updated: Apr 14, 2021
Cypress is a desktop application, that can be installed via npm or directly by download. And the desktop application supports the following Operating System.
macOS 10.9 and above (64-bit only)
Linux Ubuntu 12.04 and above, Fedora 21 and Debian 8 (64-bit only)
Windows 7 and above
To Install Via Npm:
Step 1: Install Node.js
As cypress is written in Node.js, we first need to install Node.js in our machine to install npm.
You can download Node.js from its official website.
Step 2: Set Environment Variable
In your PC, go to advance settings -> set Environment Variable and system variable.
Click New -> set variable name as "NODE_HOME" and your Node.js path to variable value.
Step 3: Created package.json
Create a folder where you want to have your workspace. Open Command prompt from that path, and type the following command.
Once you have typed your command, enter the required details, type yes and hit enter.
Now you could see, Package.json is created in the folder created.
Step 4: Install Cypress
You can use the following commands to install cypress from command prompt.
npm install cypress --save-dev
Or if your npm version is >5.2 you can use,
npx cypress install
npx cypress install --force
Step 5: Open Cypress
To open cypress from command prompt, enter any of the following commands,
By using the alias for node modules:
$(npm bin)/cypress open
npx cypress open
To Direct Donwload:
You can directly download cypress from the official cypress site.
Now we have Learnt how to Install and setup cypress in your desktop. Happy Testing!!