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 anythingthat runs on a browser - It supports all technologies
angular/non angular,react,vueetc - Cypress can automate
API testingalso - Scripts are written in
Java Script - The community edition is
freebut it has licensed version also - The licensed version has
dash boardservice 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 waitingmechanism 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/videosthat 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,Electronbrowsers - 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.
MochaTesting frameworkChaiassertion libraryJQueryto manipulate DOM elementsBlueBirdpromises to make it synchronousLoadLashfor common utilities