SlideShare a Scribd company logo
End to End Test Automation with
Cypress.io- The future of test
automation tool for both Developers and
QA
• Pankaj Singh
Cypress
 Cypress is an open-source JavaScript-based test automation framework built on NodeJS. Built for the modern web, Cypress
operates directly in the browser so it’s easy for developers to work with.
 Cypress runs tests (written in JavaScript) in its unique and interactive window. It supports different types of testing such as end
to end testing, unit testing, integration testing, visual testing and API testing. Since it is a NodeJS based framework, testers need
to have Node runtime executables in their system to execute Cypress tests.
Cypress.io is a custom implementation for selenium’s web driver API, no need to install drivers for the specific browsers and
their versions.
• Cypress Statistics
Stars: 32.6K
Forks: 1.9K
Used By: 235K
Contributors: 288
Weekly downloads: 2,384,947
Data Source: Cypress Github and NPM
Can we use Selenium WebDriver to test
AngularJS applications?
Yes we can use traditional WebDriver to test AngularJS applications.
But tool like cypress.io and Protractor makes the life much more easier .
It has Automatic Waiting for elements which handles asynchronous loading. Selenium cannot handle
such asynchronous calls.
Angular elements are identified by - by. Model and by. Binding, which is not supported by the traditional
WebDriver.
Angular uses IDs heavily for interaction and DOM manipulation. As a result, WebDriver tests cannot rely
on IDs to locate elements, and locating by name is bit more hassle (non-unique etc).
Can we always rely on Selenium?
Tools to Automate AngularJS applications and
Alternative tools for Protractor
End to end test automation with cypress
Why to choose Cypress
 Open Source
 Automation tool for both
Developers and QA
 Supports frameworks like
Jest, Mocha
 Runs very fast
 Real time reloads
 Automatic waiting, no need to add
sleeps
 Easy to set up, with just one line
command
 Easy to Write test, JavaScript
testing framework
 Easy to debug tests
 Travel back in time
 Not based on selenium
 Runs directly in the browser
 Direct access to Application under test
 No need to add any drivers for the browser and it’s version-specific.
 Screenshots and Videos can be captured automatically
 Easy to set up with CI tools
 Flake resistant
 Parallelization
 Supports reporting like Mochawesome or Slack reporting
 Supports all modern web browsers {angular, react, vue} testing.
Cypress.io all in one
What’s New in Cypress.io
Cypress Features & Advantages
Front-end testing tool
Open Source
Unit, Integration & end-to-end testing
Automatic waits, no need to add sleeps
to your test
Script written in JavaScript
Framework – Mocha
Assertion – Chai
Architecturally different from Selenium
Browsers driver are by default included
Browsers Support & System
requirements:
 Chrome
 Chromium
 Electron {Headless}
 Firefox
 Edge
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
• If using npm to install Cypress, we support:
Node.js 12 and above
Cypress Installation and Project Setup
Three ways to install Cypress:
 Using npm
• npm install cypress –save-dev
 Using yarn
• yarn add cypress –dev
 Direct download
• https://download.cypress.io/desktop
Prerequisites :-
 Download Node and NPM
 Set NODE_HOME Env. Variable
 Create Cypress Working Folder
 Install Cypress
 Download visual studio code editor
Cypress framework structure
Writing your first Test Case
 Create a new file in cypress/integration/core.button.js
 describe is a Cypress method (borrowed from Mocha) for containing one or more related tests.
Every time you start writing a new suite of tests for a functionality wrap it in a describe block
 Next up we're going to meet another function called it which is the actual Test case
Limitations of Cypress
Programming Language: Cypress Supports only JavaScript/Typescript.
Multiple Tab: Cypress does not support multiple tabs or the ability to switch to Parent and Child windows.
Native Mobile Apps: Cypress does not support native mobile app automation.
iframe Support: Cypress support for iframes is limited.
Parallel/Concurrent Execution: Cypress doesn’t support parallel execution of tests on the same or multiple
browsers.
Single Origin Tests: Users cannot create tests under different origins or URLs. Tests must be always in line
with single origin.
Selector Support: Cypress supports only CSS selectors natively but there are third-party packages that can
be plugged to use XPath.
Assertion Libraries: Cypress supports only Mocha and Chai assertion libraries.
Third-party authentication: If testers have to test third-party authentication mechanisms like SSO or Active
Directory login, these functions cannot be automated. QAs need to use API calls to create login sessions.
Ad

More Related Content

What's hot (20)

Getting Started With Cypress
Getting Started With CypressGetting Started With Cypress
Getting Started With Cypress
Knoldus Inc.
 
Cypress for Testing
Cypress for TestingCypress for Testing
Cypress for Testing
PoojaSingh1123
 
Automated testing with Cypress
Automated testing with CypressAutomated testing with Cypress
Automated testing with Cypress
Yong Shean Chong
 
Cypress vs Selenium WebDriver: Better, Or Just Different? -- by Gil Tayar
Cypress vs Selenium WebDriver: Better, Or Just Different? -- by Gil TayarCypress vs Selenium WebDriver: Better, Or Just Different? -- by Gil Tayar
Cypress vs Selenium WebDriver: Better, Or Just Different? -- by Gil Tayar
Applitools
 
Cypress e2e automation testing - day1 intor by: Hassan Hameed
Cypress e2e automation testing -  day1 intor by: Hassan HameedCypress e2e automation testing -  day1 intor by: Hassan Hameed
Cypress e2e automation testing - day1 intor by: Hassan Hameed
Hassan Muhammad
 
Progressive Web App Testing With Cypress.io
Progressive Web App Testing With Cypress.ioProgressive Web App Testing With Cypress.io
Progressive Web App Testing With Cypress.io
Knoldus Inc.
 
Cypress Testing.pptx
Cypress Testing.pptxCypress Testing.pptx
Cypress Testing.pptx
JasmeenShrestha
 
Test Automation
Test AutomationTest Automation
Test Automation
rockoder
 
Introduction cypress
Introduction cypressIntroduction cypress
Introduction cypress
Oim Trust
 
Automation Testing by Selenium Web Driver
Automation Testing by Selenium Web DriverAutomation Testing by Selenium Web Driver
Automation Testing by Selenium Web Driver
Cuelogic Technologies Pvt. Ltd.
 
Cypress first impressions
Cypress first impressionsCypress first impressions
Cypress first impressions
Hans Emmel
 
Cypress testing
Cypress testingCypress testing
Cypress testing
Vladyslav Romanchenko
 
Automation testing
Automation testingAutomation testing
Automation testing
Biswajit Pratihari
 
Introduction to cypress in Angular (Chinese)
Introduction to cypress in Angular (Chinese)Introduction to cypress in Angular (Chinese)
Introduction to cypress in Angular (Chinese)
Hong Tat Yew
 
Introduction to Robot Framework
Introduction to Robot FrameworkIntroduction to Robot Framework
Introduction to Robot Framework
Somkiat Puisungnoen
 
Automation Testing using Selenium
Automation Testing using SeleniumAutomation Testing using Selenium
Automation Testing using Selenium
Naresh Chintalcheru
 
Selenium test automation
Selenium test automationSelenium test automation
Selenium test automation
Srikanth Vuriti
 
Automated Testing with Agile
Automated Testing with AgileAutomated Testing with Agile
Automated Testing with Agile
Ken McCorkell
 
Test automation process
Test automation processTest automation process
Test automation process
Bharathi Krishnamurthi
 
Cypress E2E Testing
Cypress E2E TestingCypress E2E Testing
Cypress E2E Testing
AnaBrankovic7
 
Getting Started With Cypress
Getting Started With CypressGetting Started With Cypress
Getting Started With Cypress
Knoldus Inc.
 
Automated testing with Cypress
Automated testing with CypressAutomated testing with Cypress
Automated testing with Cypress
Yong Shean Chong
 
Cypress vs Selenium WebDriver: Better, Or Just Different? -- by Gil Tayar
Cypress vs Selenium WebDriver: Better, Or Just Different? -- by Gil TayarCypress vs Selenium WebDriver: Better, Or Just Different? -- by Gil Tayar
Cypress vs Selenium WebDriver: Better, Or Just Different? -- by Gil Tayar
Applitools
 
Cypress e2e automation testing - day1 intor by: Hassan Hameed
Cypress e2e automation testing -  day1 intor by: Hassan HameedCypress e2e automation testing -  day1 intor by: Hassan Hameed
Cypress e2e automation testing - day1 intor by: Hassan Hameed
Hassan Muhammad
 
Progressive Web App Testing With Cypress.io
Progressive Web App Testing With Cypress.ioProgressive Web App Testing With Cypress.io
Progressive Web App Testing With Cypress.io
Knoldus Inc.
 
Test Automation
Test AutomationTest Automation
Test Automation
rockoder
 
Introduction cypress
Introduction cypressIntroduction cypress
Introduction cypress
Oim Trust
 
Cypress first impressions
Cypress first impressionsCypress first impressions
Cypress first impressions
Hans Emmel
 
Introduction to cypress in Angular (Chinese)
Introduction to cypress in Angular (Chinese)Introduction to cypress in Angular (Chinese)
Introduction to cypress in Angular (Chinese)
Hong Tat Yew
 
Automation Testing using Selenium
Automation Testing using SeleniumAutomation Testing using Selenium
Automation Testing using Selenium
Naresh Chintalcheru
 
Selenium test automation
Selenium test automationSelenium test automation
Selenium test automation
Srikanth Vuriti
 
Automated Testing with Agile
Automated Testing with AgileAutomated Testing with Agile
Automated Testing with Agile
Ken McCorkell
 

Similar to End to end test automation with cypress (20)

Cypress vs Playwright: A Comparative Analysis
Cypress vs Playwright: A Comparative AnalysisCypress vs Playwright: A Comparative Analysis
Cypress vs Playwright: A Comparative Analysis
Shubham Joshi
 
Introduction To Cypress | Differences Between Cypress & Selenium
Introduction To Cypress | Differences Between Cypress & SeleniumIntroduction To Cypress | Differences Between Cypress & Selenium
Introduction To Cypress | Differences Between Cypress & Selenium
Ravendra Singh
 
Cypress vs Selenium Choosing the Best Tool for Your Automation Needs.pdf
Cypress vs Selenium Choosing the Best Tool for Your Automation Needs.pdfCypress vs Selenium Choosing the Best Tool for Your Automation Needs.pdf
Cypress vs Selenium Choosing the Best Tool for Your Automation Needs.pdf
Steve Wortham
 
Test Automation Using Selenium
Test Automation Using SeleniumTest Automation Using Selenium
Test Automation Using Selenium
Nikhil Kapoor
 
Selenium
SeleniumSelenium
Selenium
Milind Hali
 
Designing an effective hybrid apps automation framework
Designing an effective hybrid apps automation frameworkDesigning an effective hybrid apps automation framework
Designing an effective hybrid apps automation framework
Andrea Tino
 
Python selenium
Python seleniumPython selenium
Python selenium
Ducat
 
Cypress Testing Demystified: A Practical Guide
Cypress Testing Demystified: A Practical GuideCypress Testing Demystified: A Practical Guide
Cypress Testing Demystified: A Practical Guide
Testgrid.io
 
Surati Tech Talks 2022 / Build reliable Svelte applications using Cypress
Surati Tech Talks 2022 / Build reliable Svelte applications using CypressSurati Tech Talks 2022 / Build reliable Svelte applications using Cypress
Surati Tech Talks 2022 / Build reliable Svelte applications using Cypress
Maurice De Beijer [MVP]
 
Learn Selenium - Online Guide
Learn Selenium - Online GuideLearn Selenium - Online Guide
Learn Selenium - Online Guide
bigspire
 
Selenium.pptxgsjdxhasdjhckcjjkdcbdcbvdciosdc
Selenium.pptxgsjdxhasdjhckcjjkdcbdcbvdciosdcSelenium.pptxgsjdxhasdjhckcjjkdcbdcbvdciosdc
Selenium.pptxgsjdxhasdjhckcjjkdcbdcbvdciosdc
sumanthveeramallu9
 
Selenium
SeleniumSelenium
Selenium
abiramimaya
 
Selenium vs Cypress_ A Guide to Understanding the Key Differences.pdf
Selenium vs Cypress_ A Guide to Understanding the Key Differences.pdfSelenium vs Cypress_ A Guide to Understanding the Key Differences.pdf
Selenium vs Cypress_ A Guide to Understanding the Key Differences.pdf
flufftailshop
 
STC-TestAutomation.pptx
STC-TestAutomation.pptxSTC-TestAutomation.pptx
STC-TestAutomation.pptx
Arshad QA
 
Introduction to selenium
Introduction to seleniumIntroduction to selenium
Introduction to selenium
Khaja Moiz Uddin
 
Continuous Testing in the Cloud
Continuous Testing in the CloudContinuous Testing in the Cloud
Continuous Testing in the Cloud
TechWell
 
What Is Selenium? | Selenium Basics For Beginners | Introduction To Selenium ...
What Is Selenium? | Selenium Basics For Beginners | Introduction To Selenium ...What Is Selenium? | Selenium Basics For Beginners | Introduction To Selenium ...
What Is Selenium? | Selenium Basics For Beginners | Introduction To Selenium ...
Simplilearn
 
Test automation proposal
Test automation proposalTest automation proposal
Test automation proposal
Mihai-Cristian Fratila
 
Continuous UI testing using Cypress Pros and Cons.pdf
Continuous UI testing using Cypress Pros and Cons.pdfContinuous UI testing using Cypress Pros and Cons.pdf
Continuous UI testing using Cypress Pros and Cons.pdf
pcloudy2
 
Android Automation Testing with Selendroid
Android Automation Testing with SelendroidAndroid Automation Testing with Selendroid
Android Automation Testing with Selendroid
Vikas Thange
 
Cypress vs Playwright: A Comparative Analysis
Cypress vs Playwright: A Comparative AnalysisCypress vs Playwright: A Comparative Analysis
Cypress vs Playwright: A Comparative Analysis
Shubham Joshi
 
Introduction To Cypress | Differences Between Cypress & Selenium
Introduction To Cypress | Differences Between Cypress & SeleniumIntroduction To Cypress | Differences Between Cypress & Selenium
Introduction To Cypress | Differences Between Cypress & Selenium
Ravendra Singh
 
Cypress vs Selenium Choosing the Best Tool for Your Automation Needs.pdf
Cypress vs Selenium Choosing the Best Tool for Your Automation Needs.pdfCypress vs Selenium Choosing the Best Tool for Your Automation Needs.pdf
Cypress vs Selenium Choosing the Best Tool for Your Automation Needs.pdf
Steve Wortham
 
Test Automation Using Selenium
Test Automation Using SeleniumTest Automation Using Selenium
Test Automation Using Selenium
Nikhil Kapoor
 
Designing an effective hybrid apps automation framework
Designing an effective hybrid apps automation frameworkDesigning an effective hybrid apps automation framework
Designing an effective hybrid apps automation framework
Andrea Tino
 
Python selenium
Python seleniumPython selenium
Python selenium
Ducat
 
Cypress Testing Demystified: A Practical Guide
Cypress Testing Demystified: A Practical GuideCypress Testing Demystified: A Practical Guide
Cypress Testing Demystified: A Practical Guide
Testgrid.io
 
Surati Tech Talks 2022 / Build reliable Svelte applications using Cypress
Surati Tech Talks 2022 / Build reliable Svelte applications using CypressSurati Tech Talks 2022 / Build reliable Svelte applications using Cypress
Surati Tech Talks 2022 / Build reliable Svelte applications using Cypress
Maurice De Beijer [MVP]
 
Learn Selenium - Online Guide
Learn Selenium - Online GuideLearn Selenium - Online Guide
Learn Selenium - Online Guide
bigspire
 
Selenium.pptxgsjdxhasdjhckcjjkdcbdcbvdciosdc
Selenium.pptxgsjdxhasdjhckcjjkdcbdcbvdciosdcSelenium.pptxgsjdxhasdjhckcjjkdcbdcbvdciosdc
Selenium.pptxgsjdxhasdjhckcjjkdcbdcbvdciosdc
sumanthveeramallu9
 
Selenium vs Cypress_ A Guide to Understanding the Key Differences.pdf
Selenium vs Cypress_ A Guide to Understanding the Key Differences.pdfSelenium vs Cypress_ A Guide to Understanding the Key Differences.pdf
Selenium vs Cypress_ A Guide to Understanding the Key Differences.pdf
flufftailshop
 
STC-TestAutomation.pptx
STC-TestAutomation.pptxSTC-TestAutomation.pptx
STC-TestAutomation.pptx
Arshad QA
 
Continuous Testing in the Cloud
Continuous Testing in the CloudContinuous Testing in the Cloud
Continuous Testing in the Cloud
TechWell
 
What Is Selenium? | Selenium Basics For Beginners | Introduction To Selenium ...
What Is Selenium? | Selenium Basics For Beginners | Introduction To Selenium ...What Is Selenium? | Selenium Basics For Beginners | Introduction To Selenium ...
What Is Selenium? | Selenium Basics For Beginners | Introduction To Selenium ...
Simplilearn
 
Continuous UI testing using Cypress Pros and Cons.pdf
Continuous UI testing using Cypress Pros and Cons.pdfContinuous UI testing using Cypress Pros and Cons.pdf
Continuous UI testing using Cypress Pros and Cons.pdf
pcloudy2
 
Android Automation Testing with Selendroid
Android Automation Testing with SelendroidAndroid Automation Testing with Selendroid
Android Automation Testing with Selendroid
Vikas Thange
 
Ad

Recently uploaded (20)

Dev Dives: Automate and orchestrate your processes with UiPath Maestro
Dev Dives: Automate and orchestrate your processes with UiPath MaestroDev Dives: Automate and orchestrate your processes with UiPath Maestro
Dev Dives: Automate and orchestrate your processes with UiPath Maestro
UiPathCommunity
 
How analogue intelligence complements AI
How analogue intelligence complements AIHow analogue intelligence complements AI
How analogue intelligence complements AI
Paul Rowe
 
Increasing Retail Store Efficiency How can Planograms Save Time and Money.pptx
Increasing Retail Store Efficiency How can Planograms Save Time and Money.pptxIncreasing Retail Store Efficiency How can Planograms Save Time and Money.pptx
Increasing Retail Store Efficiency How can Planograms Save Time and Money.pptx
Anoop Ashok
 
Massive Power Outage Hits Spain, Portugal, and France: Causes, Impact, and On...
Massive Power Outage Hits Spain, Portugal, and France: Causes, Impact, and On...Massive Power Outage Hits Spain, Portugal, and France: Causes, Impact, and On...
Massive Power Outage Hits Spain, Portugal, and France: Causes, Impact, and On...
Aqusag Technologies
 
Complete Guide to Advanced Logistics Management Software in Riyadh.pdf
Complete Guide to Advanced Logistics Management Software in Riyadh.pdfComplete Guide to Advanced Logistics Management Software in Riyadh.pdf
Complete Guide to Advanced Logistics Management Software in Riyadh.pdf
Software Company
 
Special Meetup Edition - TDX Bengaluru Meetup #52.pptx
Special Meetup Edition - TDX Bengaluru Meetup #52.pptxSpecial Meetup Edition - TDX Bengaluru Meetup #52.pptx
Special Meetup Edition - TDX Bengaluru Meetup #52.pptx
shyamraj55
 
Electronic_Mail_Attacks-1-35.pdf by xploit
Electronic_Mail_Attacks-1-35.pdf by xploitElectronic_Mail_Attacks-1-35.pdf by xploit
Electronic_Mail_Attacks-1-35.pdf by xploit
niftliyevhuseyn
 
2025-05-Q4-2024-Investor-Presentation.pptx
2025-05-Q4-2024-Investor-Presentation.pptx2025-05-Q4-2024-Investor-Presentation.pptx
2025-05-Q4-2024-Investor-Presentation.pptx
Samuele Fogagnolo
 
Cyber Awareness overview for 2025 month of security
Cyber Awareness overview for 2025 month of securityCyber Awareness overview for 2025 month of security
Cyber Awareness overview for 2025 month of security
riccardosl1
 
How Can I use the AI Hype in my Business Context?
How Can I use the AI Hype in my Business Context?How Can I use the AI Hype in my Business Context?
How Can I use the AI Hype in my Business Context?
Daniel Lehner
 
DevOpsDays Atlanta 2025 - Building 10x Development Organizations.pptx
DevOpsDays Atlanta 2025 - Building 10x Development Organizations.pptxDevOpsDays Atlanta 2025 - Building 10x Development Organizations.pptx
DevOpsDays Atlanta 2025 - Building 10x Development Organizations.pptx
Justin Reock
 
Into The Box Conference Keynote Day 1 (ITB2025)
Into The Box Conference Keynote Day 1 (ITB2025)Into The Box Conference Keynote Day 1 (ITB2025)
Into The Box Conference Keynote Day 1 (ITB2025)
Ortus Solutions, Corp
 
ThousandEyes Partner Innovation Updates for May 2025
ThousandEyes Partner Innovation Updates for May 2025ThousandEyes Partner Innovation Updates for May 2025
ThousandEyes Partner Innovation Updates for May 2025
ThousandEyes
 
Andrew Marnell: Transforming Business Strategy Through Data-Driven Insights
Andrew Marnell: Transforming Business Strategy Through Data-Driven InsightsAndrew Marnell: Transforming Business Strategy Through Data-Driven Insights
Andrew Marnell: Transforming Business Strategy Through Data-Driven Insights
Andrew Marnell
 
HCL Nomad Web – Best Practices and Managing Multiuser Environments
HCL Nomad Web – Best Practices and Managing Multiuser EnvironmentsHCL Nomad Web – Best Practices and Managing Multiuser Environments
HCL Nomad Web – Best Practices and Managing Multiuser Environments
panagenda
 
The Evolution of Meme Coins A New Era for Digital Currency ppt.pdf
The Evolution of Meme Coins A New Era for Digital Currency ppt.pdfThe Evolution of Meme Coins A New Era for Digital Currency ppt.pdf
The Evolution of Meme Coins A New Era for Digital Currency ppt.pdf
Abi john
 
Noah Loul Shares 5 Steps to Implement AI Agents for Maximum Business Efficien...
Noah Loul Shares 5 Steps to Implement AI Agents for Maximum Business Efficien...Noah Loul Shares 5 Steps to Implement AI Agents for Maximum Business Efficien...
Noah Loul Shares 5 Steps to Implement AI Agents for Maximum Business Efficien...
Noah Loul
 
tecnologias de las primeras civilizaciones.pdf
tecnologias de las primeras civilizaciones.pdftecnologias de las primeras civilizaciones.pdf
tecnologias de las primeras civilizaciones.pdf
fjgm517
 
UiPath Community Berlin: Orchestrator API, Swagger, and Test Manager API
UiPath Community Berlin: Orchestrator API, Swagger, and Test Manager APIUiPath Community Berlin: Orchestrator API, Swagger, and Test Manager API
UiPath Community Berlin: Orchestrator API, Swagger, and Test Manager API
UiPathCommunity
 
AI Changes Everything – Talk at Cardiff Metropolitan University, 29th April 2...
AI Changes Everything – Talk at Cardiff Metropolitan University, 29th April 2...AI Changes Everything – Talk at Cardiff Metropolitan University, 29th April 2...
AI Changes Everything – Talk at Cardiff Metropolitan University, 29th April 2...
Alan Dix
 
Dev Dives: Automate and orchestrate your processes with UiPath Maestro
Dev Dives: Automate and orchestrate your processes with UiPath MaestroDev Dives: Automate and orchestrate your processes with UiPath Maestro
Dev Dives: Automate and orchestrate your processes with UiPath Maestro
UiPathCommunity
 
How analogue intelligence complements AI
How analogue intelligence complements AIHow analogue intelligence complements AI
How analogue intelligence complements AI
Paul Rowe
 
Increasing Retail Store Efficiency How can Planograms Save Time and Money.pptx
Increasing Retail Store Efficiency How can Planograms Save Time and Money.pptxIncreasing Retail Store Efficiency How can Planograms Save Time and Money.pptx
Increasing Retail Store Efficiency How can Planograms Save Time and Money.pptx
Anoop Ashok
 
Massive Power Outage Hits Spain, Portugal, and France: Causes, Impact, and On...
Massive Power Outage Hits Spain, Portugal, and France: Causes, Impact, and On...Massive Power Outage Hits Spain, Portugal, and France: Causes, Impact, and On...
Massive Power Outage Hits Spain, Portugal, and France: Causes, Impact, and On...
Aqusag Technologies
 
Complete Guide to Advanced Logistics Management Software in Riyadh.pdf
Complete Guide to Advanced Logistics Management Software in Riyadh.pdfComplete Guide to Advanced Logistics Management Software in Riyadh.pdf
Complete Guide to Advanced Logistics Management Software in Riyadh.pdf
Software Company
 
Special Meetup Edition - TDX Bengaluru Meetup #52.pptx
Special Meetup Edition - TDX Bengaluru Meetup #52.pptxSpecial Meetup Edition - TDX Bengaluru Meetup #52.pptx
Special Meetup Edition - TDX Bengaluru Meetup #52.pptx
shyamraj55
 
Electronic_Mail_Attacks-1-35.pdf by xploit
Electronic_Mail_Attacks-1-35.pdf by xploitElectronic_Mail_Attacks-1-35.pdf by xploit
Electronic_Mail_Attacks-1-35.pdf by xploit
niftliyevhuseyn
 
2025-05-Q4-2024-Investor-Presentation.pptx
2025-05-Q4-2024-Investor-Presentation.pptx2025-05-Q4-2024-Investor-Presentation.pptx
2025-05-Q4-2024-Investor-Presentation.pptx
Samuele Fogagnolo
 
Cyber Awareness overview for 2025 month of security
Cyber Awareness overview for 2025 month of securityCyber Awareness overview for 2025 month of security
Cyber Awareness overview for 2025 month of security
riccardosl1
 
How Can I use the AI Hype in my Business Context?
How Can I use the AI Hype in my Business Context?How Can I use the AI Hype in my Business Context?
How Can I use the AI Hype in my Business Context?
Daniel Lehner
 
DevOpsDays Atlanta 2025 - Building 10x Development Organizations.pptx
DevOpsDays Atlanta 2025 - Building 10x Development Organizations.pptxDevOpsDays Atlanta 2025 - Building 10x Development Organizations.pptx
DevOpsDays Atlanta 2025 - Building 10x Development Organizations.pptx
Justin Reock
 
Into The Box Conference Keynote Day 1 (ITB2025)
Into The Box Conference Keynote Day 1 (ITB2025)Into The Box Conference Keynote Day 1 (ITB2025)
Into The Box Conference Keynote Day 1 (ITB2025)
Ortus Solutions, Corp
 
ThousandEyes Partner Innovation Updates for May 2025
ThousandEyes Partner Innovation Updates for May 2025ThousandEyes Partner Innovation Updates for May 2025
ThousandEyes Partner Innovation Updates for May 2025
ThousandEyes
 
Andrew Marnell: Transforming Business Strategy Through Data-Driven Insights
Andrew Marnell: Transforming Business Strategy Through Data-Driven InsightsAndrew Marnell: Transforming Business Strategy Through Data-Driven Insights
Andrew Marnell: Transforming Business Strategy Through Data-Driven Insights
Andrew Marnell
 
HCL Nomad Web – Best Practices and Managing Multiuser Environments
HCL Nomad Web – Best Practices and Managing Multiuser EnvironmentsHCL Nomad Web – Best Practices and Managing Multiuser Environments
HCL Nomad Web – Best Practices and Managing Multiuser Environments
panagenda
 
The Evolution of Meme Coins A New Era for Digital Currency ppt.pdf
The Evolution of Meme Coins A New Era for Digital Currency ppt.pdfThe Evolution of Meme Coins A New Era for Digital Currency ppt.pdf
The Evolution of Meme Coins A New Era for Digital Currency ppt.pdf
Abi john
 
Noah Loul Shares 5 Steps to Implement AI Agents for Maximum Business Efficien...
Noah Loul Shares 5 Steps to Implement AI Agents for Maximum Business Efficien...Noah Loul Shares 5 Steps to Implement AI Agents for Maximum Business Efficien...
Noah Loul Shares 5 Steps to Implement AI Agents for Maximum Business Efficien...
Noah Loul
 
tecnologias de las primeras civilizaciones.pdf
tecnologias de las primeras civilizaciones.pdftecnologias de las primeras civilizaciones.pdf
tecnologias de las primeras civilizaciones.pdf
fjgm517
 
UiPath Community Berlin: Orchestrator API, Swagger, and Test Manager API
UiPath Community Berlin: Orchestrator API, Swagger, and Test Manager APIUiPath Community Berlin: Orchestrator API, Swagger, and Test Manager API
UiPath Community Berlin: Orchestrator API, Swagger, and Test Manager API
UiPathCommunity
 
AI Changes Everything – Talk at Cardiff Metropolitan University, 29th April 2...
AI Changes Everything – Talk at Cardiff Metropolitan University, 29th April 2...AI Changes Everything – Talk at Cardiff Metropolitan University, 29th April 2...
AI Changes Everything – Talk at Cardiff Metropolitan University, 29th April 2...
Alan Dix
 
Ad

End to end test automation with cypress

  • 1. End to End Test Automation with Cypress.io- The future of test automation tool for both Developers and QA • Pankaj Singh
  • 2. Cypress  Cypress is an open-source JavaScript-based test automation framework built on NodeJS. Built for the modern web, Cypress operates directly in the browser so it’s easy for developers to work with.  Cypress runs tests (written in JavaScript) in its unique and interactive window. It supports different types of testing such as end to end testing, unit testing, integration testing, visual testing and API testing. Since it is a NodeJS based framework, testers need to have Node runtime executables in their system to execute Cypress tests. Cypress.io is a custom implementation for selenium’s web driver API, no need to install drivers for the specific browsers and their versions. • Cypress Statistics Stars: 32.6K Forks: 1.9K Used By: 235K Contributors: 288 Weekly downloads: 2,384,947 Data Source: Cypress Github and NPM
  • 3. Can we use Selenium WebDriver to test AngularJS applications? Yes we can use traditional WebDriver to test AngularJS applications. But tool like cypress.io and Protractor makes the life much more easier . It has Automatic Waiting for elements which handles asynchronous loading. Selenium cannot handle such asynchronous calls. Angular elements are identified by - by. Model and by. Binding, which is not supported by the traditional WebDriver. Angular uses IDs heavily for interaction and DOM manipulation. As a result, WebDriver tests cannot rely on IDs to locate elements, and locating by name is bit more hassle (non-unique etc).
  • 4. Can we always rely on Selenium?
  • 5. Tools to Automate AngularJS applications and Alternative tools for Protractor
  • 7. Why to choose Cypress  Open Source  Automation tool for both Developers and QA  Supports frameworks like Jest, Mocha  Runs very fast  Real time reloads  Automatic waiting, no need to add sleeps  Easy to set up, with just one line command  Easy to Write test, JavaScript testing framework  Easy to debug tests  Travel back in time  Not based on selenium  Runs directly in the browser  Direct access to Application under test  No need to add any drivers for the browser and it’s version-specific.  Screenshots and Videos can be captured automatically  Easy to set up with CI tools  Flake resistant  Parallelization  Supports reporting like Mochawesome or Slack reporting  Supports all modern web browsers {angular, react, vue} testing.
  • 9. What’s New in Cypress.io
  • 10. Cypress Features & Advantages Front-end testing tool Open Source Unit, Integration & end-to-end testing Automatic waits, no need to add sleeps to your test Script written in JavaScript Framework – Mocha Assertion – Chai Architecturally different from Selenium Browsers driver are by default included
  • 11. Browsers Support & System requirements:  Chrome  Chromium  Electron {Headless}  Firefox  Edge 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 • If using npm to install Cypress, we support: Node.js 12 and above
  • 12. Cypress Installation and Project Setup Three ways to install Cypress:  Using npm • npm install cypress –save-dev  Using yarn • yarn add cypress –dev  Direct download • https://download.cypress.io/desktop Prerequisites :-  Download Node and NPM  Set NODE_HOME Env. Variable  Create Cypress Working Folder  Install Cypress  Download visual studio code editor
  • 14. Writing your first Test Case  Create a new file in cypress/integration/core.button.js  describe is a Cypress method (borrowed from Mocha) for containing one or more related tests. Every time you start writing a new suite of tests for a functionality wrap it in a describe block  Next up we're going to meet another function called it which is the actual Test case
  • 15. Limitations of Cypress Programming Language: Cypress Supports only JavaScript/Typescript. Multiple Tab: Cypress does not support multiple tabs or the ability to switch to Parent and Child windows. Native Mobile Apps: Cypress does not support native mobile app automation. iframe Support: Cypress support for iframes is limited. Parallel/Concurrent Execution: Cypress doesn’t support parallel execution of tests on the same or multiple browsers. Single Origin Tests: Users cannot create tests under different origins or URLs. Tests must be always in line with single origin. Selector Support: Cypress supports only CSS selectors natively but there are third-party packages that can be plugged to use XPath. Assertion Libraries: Cypress supports only Mocha and Chai assertion libraries. Third-party authentication: If testers have to test third-party authentication mechanisms like SSO or Active Directory login, these functions cannot be automated. QAs need to use API calls to create login sessions.