Successfully reported this slideshow.
We use your LinkedIn profile and activity data to personalize ads and to show you more relevant ads. You can change your ad preferences anytime.
Cypress vs. Selenium
the end of an era?
Lyudmil Latinov, Xoomworks
Agenda
• Selenium overview
• Cypress overview
• Cypress vs. Selenium
• The end of an era?
• Cypress sugar
• Q&A
Selenium Overview
Java C#
Ruby Python
JavaScript Other
Bindings / Client WebDriver / Server
JSON
Cypress Overview
•UI end-to-end automation testing framework
•Not based on Selenium
•Runs directly in browser
•direct acce...
How to do it
•Install Cypress as NPM package
•Write tests in any text editor
•Debug in Cypress Test Runner
•Run test from ...
Debug tests in Cypress Test Runner
Library/Framework
Selenium Cypress
• Library
• Can be bundled with any
framework/tool
• Framework
• Mocha
• Chai
• Chai-jQ...
Test Pyramid
Unit
Integration
UISelenium Cypress
Programming Languages
Selenium Cypress
• Java
• C#
• Ruby
• Python
• JavaScript
• PHP, Perl, Golang, Haskel,
Objective-C, ...
Selectors
Selenium Cypress
• ID
• Name
• Class Name
• Tag Name
• (Partial) Link Text
• CSS Selector
• XPath Selector
• jQu...
Supported Browsers
Selenium Cypress
And many more … support is on its way
Cypress vs. Selenium (1)
Selenium Cypress
Speed
Wait for element
Remote execution
Parallel execution
Headless
Cypress vs. Selenium (2)
Selenium Cypress
Screenshot
Video
Documentation
Community
Cypress vs. Selenium (3)
Selenium Cypress
Execute JS
Switch tabs
Several browsers
Load extensions
Manage cookies
Test Mushroom
UI
Unit
Int.
The end of an era?
Cypress Sugar (1)
• Control application under test and its state
• Spies, stubs, and clocks
• verify/modify function behav...
Cypress Sugar (2)
• Login request
• send request and its response will change browser state
• use browser cookie and user ...
Thank You!
Lyudmil Latinov
Senior Automation QA Engineer
Xoomworks
automationrhapsody.com
STIONS?
ANY
Lyudmil Latinov
Senior Automation QA Engineer
Xoomworks
automationrhapsody.com
thanks to our sponsors:
www.qachallengeaccepted.com
info@qachallengeaccepted.com
#qachallenge
Upcoming SlideShare
Loading in …5
×

QA Challenge Accepted 4.0 - Cypress vs. Selenium

1,200 views

Published on

Comparison between Cypress and Selenium.

Published in: Software
  • Be the first to comment

QA Challenge Accepted 4.0 - Cypress vs. Selenium

  1. 1. Cypress vs. Selenium the end of an era? Lyudmil Latinov, Xoomworks
  2. 2. Agenda • Selenium overview • Cypress overview • Cypress vs. Selenium • The end of an era? • Cypress sugar • Q&A
  3. 3. Selenium Overview Java C# Ruby Python JavaScript Other Bindings / Client WebDriver / Server JSON
  4. 4. Cypress Overview •UI end-to-end automation testing framework •Not based on Selenium •Runs directly in browser •direct access to application under test •For QA Engineers and Developers •Easy to debug tests •travel back in time
  5. 5. How to do it •Install Cypress as NPM package •Write tests in any text editor •Debug in Cypress Test Runner •Run test from command line •Integrate in CI/CD pipelines
  6. 6. Debug tests in Cypress Test Runner
  7. 7. Library/Framework Selenium Cypress • Library • Can be bundled with any framework/tool • Framework • Mocha • Chai • Chai-jQuery • Sinon • Sinon-Chai
  8. 8. Test Pyramid Unit Integration UISelenium Cypress
  9. 9. Programming Languages Selenium Cypress • Java • C# • Ruby • Python • JavaScript • PHP, Perl, Golang, Haskel, Objective-C, R, Elixir, etc. • JavaScript
  10. 10. Selectors Selenium Cypress • ID • Name • Class Name • Tag Name • (Partial) Link Text • CSS Selector • XPath Selector • jQuery
  11. 11. Supported Browsers Selenium Cypress And many more … support is on its way
  12. 12. Cypress vs. Selenium (1) Selenium Cypress Speed Wait for element Remote execution Parallel execution Headless
  13. 13. Cypress vs. Selenium (2) Selenium Cypress Screenshot Video Documentation Community
  14. 14. Cypress vs. Selenium (3) Selenium Cypress Execute JS Switch tabs Several browsers Load extensions Manage cookies
  15. 15. Test Mushroom UI Unit Int.
  16. 16. The end of an era?
  17. 17. Cypress Sugar (1) • Control application under test and its state • Spies, stubs, and clocks • verify/modify function behaviour, control date and time • Control network traffic • assert on a request to an API • intercept, delay or block an API response • stub backend – develop ahead of backend
  18. 18. Cypress Sugar (2) • Login request • send request and its response will change browser state • use browser cookie and user agent • skips security limitations, such CORS check • Test Electron desktop applications • uses Electron browser (Chromium + Node.js)
  19. 19. Thank You! Lyudmil Latinov Senior Automation QA Engineer Xoomworks automationrhapsody.com
  20. 20. STIONS? ANY Lyudmil Latinov Senior Automation QA Engineer Xoomworks automationrhapsody.com
  21. 21. thanks to our sponsors: www.qachallengeaccepted.com info@qachallengeaccepted.com #qachallenge

×