Upgrade to Pro — share decks privately, control downloads, hide ads and more …

Cypress_-_e2e_testing_for_Web_in__2019_.pdf

 Cypress_-_e2e_testing_for_Web_in__2019_.pdf

Shahjada Talukdar

August 21, 2019
Tweet

Transcript

  1. Limitations of Selenium • Old(2004) and was not built for

    the today’s modern webapps • Slow, flaky tests, not stable enough
  2. Experience with robot • It’s hard to make dev env

    • Hard to write and run tests • Local env test running is hard while development • Not sure if it’s very good for TDD
  3. Objective ( to solve the problem ) To have a

    testing environment with possibly fewer flaky tests and faster & easier dev experience.
  4. Challenges for companies • Existing test framework(Robot) is already in

    power. • Existing app(already built), harder than apps from scratch. • Need to think about the existing DevOps environment.
  5. Current Limitations of cypress • Still pretty new ( I

    think it as react’s beginning time ). • No IE support yet (they say to test with chrome and if the app works 100% means it is tested e2e so it’s a big relief too ).
  6. Benefits(?) of Cypress • Same JS code everywhere. • Development

    environment couldn’t be easier than this. • We can use our existing testing knowledge like mocha, jest, jasmine
  7. e2e tests need to wait for the page to render

    and finish the http calls Cypress does this by default ( at least they say so ) That’s why, fewer/no manual time waits
  8. My app is developed with React(redux), Angular, Vue, Polymer, Vanilla?

    Cypress does not need to know the framework. And no major application code changes for the tests to run
  9. Time travelling Cypress takes snapshots as your tests run. Simply

    hover over commands in the Command Log to see exactly what happened at each step.
  10. Real time reloads Cypress automatically reloads whenever you make changes

    to your tests. See commands execute in real time in your app.
  11. Debuggability Stop guessing why your tests are failing. Debug directly

    from familiar tools like Chrome DevTools. Our readable errors and stack traces make debugging lightning fast.
  12. Automatic waiting Never add waits or sleeps to your tests.

    Cypress automatically waits for commands and assertions before moving on. No more async hell.
  13. Network traffic control - Easily control, stub, and test edge

    cases without involving your server. You can stub network traffic however you like. - Fixtures
  14. Screenshots and videos - View screenshots taken automatically on failure,

    or videos of your entire test suite when run headlessly. - Screenshots using API
  15. Comparisons - With cypress it will be less waits and

    sleeps or probably close to none. Cypress is growing so fast, we can hope it will be even more stable & better.