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.

QA Challenge Accepted 4.0 - Cypress vs. Selenium

346 views

Published on

Comparison between Cypress and Selenium.

Published in: Software
  • Be the first to comment

  • Be the first to like this

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

×