01 Cypress Basics - biswajitsundara/Cypress GitHub Wiki

Cypress is the next generation automation tool that aims to solve all the pain points of QA teams. It emphasizes on generating flack resistant reliable automation scripts

  • It can automate anything that runs on a browser
  • It supports all technologies angular/non angular, react,vue etc
  • Cypress can automate API testing also
  • Scripts are written in Java Script
  • The community edition is free but it has licensed version also
  • The licensed version has dash board service which is not in the community edition
  • Cypress directly interacts with browser DOM so it's different from Selenium
  • Because Selenium uses browser drivers to interact with browsers

Benefits of using Cypress

  • Cypress has automatic waiting mechanism so it really helps reducing flaky tests
  • It offers time travel, we can easily check how exactly the DOM is changing for every step
  • It captures all the screenshots/videos that helps in debugging
  • We can modify the script and upon save it will automatically execute if it's in run mode.
  • Cypress can automate UI + API both so we have more control on automating the application
  • Cross browser testing - it supports Chrome, Edge, Firefox, Electron browsers
  • Control the network layer to generate mock responses, wait for api calls to complete.

Limitations of Cypress

  • Cypress doesn't and will never support multiple tabs
  • Similarly it doesn't support multiple browsers (windows)
  • It doesn't support domain change, means (your site -> third party site) won't work.
  • It doesn't support any other protocols except "https" or "http"

Cypress Bundle

Cypress comes bundled with other libraries and we don't have to install them separately.

  • Mocha Testing framework
  • Chai assertion library
  • JQuery to manipulate DOM elements
  • BlueBird promises to make it synchronous
  • LoadLash for common utilities