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

I like my tests, like I like my friends, flake-...

I like my tests, like I like my friends, flake-free and reliable

Cypress end-to-end testing talk given at JS Conf US in Carlsbad, CA.

Amir Rustamzadeh

August 22, 2018
Tweet

More Decks by Amir Rustamzadeh

Other Decks in Programming

Transcript

  1. I like my tests, like I like my friends, flake-free

    and reliable Amir Rustamzadeh @amirrustam JS Conf ! 2018
  2. E2E Integration Unit Visit The Testing Pyramid Easy, developers really

    like to write these. More Difficult, costly, slower… Often completely ignored @amirrustam
  3. Renaissance of the Web 2005 2006 2014 2013 More complexity

    moved from backend to frontend. @amirrustam
  4. ✋ JSDOM or DOM Emulation JSDOM is not a real

    browser. Your users don’t run your app with JSDOM. One of the primary reasons for E2E is to simulate real user actions. @amirrustam
  5. Fast, easy and reliable testing for anything that runs in

    a browser. Free. Open Source. MIT License @amirrustam
  6. $ npm install -D cypress ☝ All-in-one tool You get

    everything you need ❤ Familiar tools underneath Mocha, Chia, Sinon @amirrustam
  7. ⚙ Component Testing cypress-react-unit-testing vue angular angularjs hyper-app svelte cycle

    @amirrustam https:!//github.com/bahmutov/cypress-vue-unit-test#test-adapters-for-other-frameworks
  8. 3 cypress open Great for everyday development workflow Cypress +

    Editor Side-by-Side TDD Nirvana cypress run Testing in CI/CD Pipeline Headless More efficient for running all your tests @amirrustam
  9. 3 cypress open Great for everyday development workflow Cypress +

    Editor Side-by-Side TDD Nirvana cypress run --record Video Recordings of Tests @amirrustam
  10. cypress run --parallel cypress run --parallel cypress run --parallel Your

    CI Machines 3x parallelism Ready for work signup.spec.js login.spec.js widget.spec.js @amirrustam
  11. Previous Spec Test Runs Spec Test Duration History Test Duration

    (seconds) The Future Automatic Load Balancing of Test Specs Duration Forecast @amirrustam
  12. End to End testing with Cypress By Andrew Van Slaars

    egghead.io/courses/end-to-end-testing-with-cypress
  13. Thank You npm install -D cypress Free. Open Source. MIT

    License Follow @amirrustam for link to slides.