Handysolver
Home Case Studies Technology

Cypress modern web testing tool

Author Image

Sachin

07 Jul, 2020 · 2 min read
Article Thumbnail

Cypress is a desktop application that is installed on your computer. The desktop application supports these operating systems:

  • 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

Node.js

If you’re using npm to install Cypress, we support:

  • Node.js 8 and above

Linux

If you’re using Linux, you’ll want to have the required dependencies installed on your system.

We also have an official cypress/base Docker container with all of the required dependencies installed.

Ubuntu/Debian

<code>apt-get install libgtk2.0-0 libgtk-3-0 libnotify-dev libgconf-2-4 libnss3 libxss1
libasound2 libxtst6 xauth xvfb
</code>

CentOS

yum install -y xorg-x11-server-Xvfb gtk2-devel gtk3-devel libnotify-devel GConf2
nss libXScrnSaver alsa-lib

Installing

npm install

Install Cypress via npm:

cd /your/project/path

npm install cypress --save-dev

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

Make sure that you have already run npm init or have a node_modules folder or package.json file in the root of your project to ensure cypress is installed in the correct directory.

If you’re not using Node or npm in your project or you want to try Cypress out quickly, you can always download Cypress directly from our CDN.

Recording runs to the Dashboard is not possible from the direct download. This download is only intended as a quick way to try out Cypress. To record tests to the Dashboard, you’ll need to install Cypress as an npm dependency.

The direct download will always grab the latest available version. Your platform will be detected automatically.

Then you can manually unzip and double click. Cypress will run without needing to install any dependencies. Continuous integration

Please read our Continuous Integration docs for help installing Cypress in CI. When running in linux you’ll need to install some system dependencies or you can use our Docker images which have everything you need prebuilt.

Opening Cypress

If you used npm to install, Cypress has now been installed to your ./node_modules directory, with its binary executable accessible from ./node_modules/.bin.

Now you can open Cypress from your project root one of the following ways:

The long way with the full path

<code>./node_modules/.bin/cypress open
</code>

Or with the shortcut using npm bin

<code>$(npm bin)/cypress open
</code>

Or by using npx

note: npx is included with npm > v5.2 or can be installed separately.

<code>npx cypress open</code>
Author Image

Sachin