Next Generation Automation Test for Modern Web Apps | Cypress | Selenium

Next Generation Automation Test for Modern Web apps

What is Cypress?
  • Cypress is a next-generation front-end testing tool built for the modern web application.
  • Cypress uses JavaScript to write automated tests.
  • Cypress addresses the key points from other automation tools.
  • Cypress is built on Node.js and comes packaged as an npm module
  • As t is built Node.js, it uses JavaScript for writing tests. But 90% of coding can be done using Cypress inbuilt commands which are easy to understand.
  • Cypress is having different architecture when you compare it with selenium.
  • We can write faster, easier, and more reliable tests using Cypress.
Why compare Cypress and Selenium?
  • Most testing tools (like Selenium) operate by running outside of the browser and executing remote commands across the network.
  • But Cypress engine directly operates inside the browser. In other words, it is the browser that is executing your test code.
  • This enables Cypress to listen and modify the browser behavior at run time by manipulating DOM and altering Network requests and responses on the fly.

Selenium Architecture

Cypress Architecture

Cypress Ecosystem

A complete end-to-end testing experience. Cypress is an Open source tool and consists of the following:

  1. Cypress Test Runner (Open Source Component. Locally Installed) helps you set up and start writing tests.

Source: Cypress

2. Cypress Dashboard (Recording tests). The Dashboard provides you insight into what happened when your tests ran.

Source: Cypress

7 ways Cypress is different
  • Cypress does not use Selenium
  • Cypress focuses on doing end-to-end testing well.
  • Cypress works on any front-end framework or website.
  • Cypress tests are only written in JavaScript.
  • Cypress is all in one.
  • Cypress is for developers or QA engineers.
  • Cypress runs much, much faster.

Source: Cypress

Cypress Features

Source: Cypress

Limitations
  • One cannot use Cypress to drive two browsers at the same time.
  • Cypress only supports JavaScript for creating test cases
  • It doesn’t provide support for multi-tabs
  • Cypress doesn’t provide support for browsers like Safari and IE at the moment.
  • Limited support for iFrames.
Free Consulting