Cypress javascript automation tool an introduction

Cypress is a test automation tool for web applications. With scripts written in JavaScript, there are many built in commands available.
Even though the tool can be used by using only JavaScript, one can use type script can be used.
Note: Cypress does not use selenium - it interacts with browser directly and is fast

Oen Source and free to use for most of the features - Dashboard (optional pricing)

There are 4 steps in Cypress one must know to start with

  1. Setup test - in IDE
  2. Write test
  3. Run test
  4. View the results (Debugging, if required)

As of now, 5 Browsers are supported Chrome, Firefox, edge, electron, brave

Cypress Features:

  1. Time Travel- snapshot is taken for every command - the screenshots can be seen from the command logs
    state of the application before and after the command are recorded.
  2. Automatic Waits- For assertions - automatic waits are added by cypress - if required one can add extra wait time for a specific step.

 

Pre-Requisite to install and use Cypress can be seen below:
OS: Windows 7 and >, Mac 10.9 and > (64 bit), Linux (ubuntu 12.4 and >, Fedora21, Debian 8(64 bit)

 

Before installing node, check whether node is already installed in the system, 
node -v or node --version to see the version of the node .js app
 

 

If not available, download the node.js from the official website, Download | Node.js (nodejs.org)

now in command prompt type node -v or npm -v for checking on the versions of node and npm(node package manager)

 

The node and npm is installed successfully in the machine.

https://www.cypress.io/blog/2022/03/28/real-world-testing-with-cypress/

https://www.youtube.com/watch?v=Gu9KdbpzSvk&list=PL6flErFppaj2TYXXee5Zt_rR_RpOTBfm1