Upgrade to Pro
— share decks privately, control downloads, hide ads and more …
Speaker Deck
Features
Speaker Deck
PRO
Sign in
Sign up for free
Search
Search
I like my tests, like I like my friends, flake-...
Search
Amir Rustamzadeh
August 22, 2018
Programming
210
0
Share
Embed
Copy iframe code
Copy JS code
Copy link
Start on current slide
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
More Decks by Amir Rustamzadeh
See All by Amir Rustamzadeh
Scalable Testing Practices for Modern Apps
amir
1
420
End-to-End Testing Vue Apps with Cypress
amir
2
410
REFACTR.Tech Cypress Workshop Intro
amir
1
210
Next-Generation Web Application End-to-End Testing with Cypress
amir
0
420
Other Decks in Programming
See All in Programming
AIを活用したE2Eテスト実装効率化のあゆみ / ebisu-mobile-14-kotetu
kotetuco
0
130
スマートグラスで並列バイブコーディング
hyshu
0
260
「なぜそう決めたのか」を残し続ける仕組み ― Notion AI カスタムエージェント × Slack連携による設計判断の自動記録 - NIKKEI Tech Talk #47
niftycorp
PRO
0
230
OSもどきOS
arkw
0
590
A2UI という光を覗いてみる
satohjohn
1
150
Contextとはなにか
chiroruxx
1
370
Language Server 使ってる? 〜VSCode と Zed の場合〜 / Are you using a Language Server? ~For VS Code and Zed~
handlename
0
800
Even G2とAWSで推しのエージェントを召喚しよう!
har1101
1
120
Creating Composable Callables in Contemporary C++
rollbear
0
170
Strategic Design in the Frontend: Moduliths & Micro Frontends @DDDEurope
manfredsteyer
PRO
0
130
鹿野さんに聞く!『TypeScriptコードレシピ集』で磨く実践力
tonkotsuboy_com
4
790
メソッドのジェネリクスでGoの夢は広がるか? / Kyoto.go #65
utgwkk
3
940
Featured
See All Featured
Google's AI Overviews - The New Search
badams
0
1k
Building Applications with DynamoDB
mza
96
7.1k
The Psychology of Web Performance [Beyond Tellerrand 2023]
tammyeverts
49
3.5k
Lessons Learnt from Crawling 1000+ Websites
charlesmeaden
PRO
1
1.3k
svc-hook: hooking system calls on ARM64 by binary rewriting
retrage
2
310
Abbi's Birthday
coloredviolet
3
8.2k
What's in a price? How to price your products and services
michaelherold
247
13k
Connecting the Dots Between Site Speed, User Experience & Your Business [WebExpo 2025]
tammyeverts
11
950
Joys of Absence: A Defence of Solitary Play
codingconduct
1
400
Building a Scalable Design System with Sketch
lauravandoore
463
34k
Exploring anti-patterns in Rails
aemeredith
3
430
WENDY [Excerpt]
tessaabrams
11
38k
Transcript
I like my tests, like I like my friends, flake-free
and reliable Amir Rustamzadeh @amirrustam JS Conf ! 2018
Sr. Software Engineer @amirrustam Amir Rustamzadeh
[email protected]
E2E Integration Unit Visit The Testing Pyramid @amirrustam
E2E Integration Unit Visit The Testing Pyramid Easy, developers really
like to write these. @amirrustam
E2E Integration Unit Visit The Testing Pyramid Easy, developers really
like to write these. More Difficult, costly, slower… Often completely ignored @amirrustam
E2E Integration Unit Visit The Testing Pyramid Best for users
& business @amirrustam
Renaissance of the Web 2005 2006 2014 2013 @amirrustam
Renaissance of the Web 2005 2006 2014 2013 More complexity
moved from backend to frontend. @amirrustam
2005 2006 2014 2013 Renaissance of the Web + Testing
Automation 2004 @amirrustam
Selenium Architecture Selenium Server Drivers Tests Python Javascript Java @amirrustam
Selenium Architecture Selenium Server Drivers Tests Python Javascript Java ⚠
Classical Syncing Dilemma @amirrustam
Selenium Architecture Flakiness Non-deterministic @amirrustam
✋ 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
Don’t let your users be your first E2E test. @amirrustam
Stateless Stateful @amirrustam
Fast, easy and reliable testing for anything that runs in
a browser. Free. Open Source. MIT License @amirrustam
$ npm install -D cypress ☝ All-in-one tool You get
everything you need ❤ Familiar tools underneath Mocha, Chia, Sinon @amirrustam
Lets see it in action…. @amirrustam https://github.com/cypress-io/cypress-example-todomvc
Cypress Architecture Browser Cypress Test Runner Your App @amirrustam
⚡ Native-access to the DOM and your app.
- Fast Test Runs @amirrustam
⏳ Automatic Waiting @amirrustam
Debuggability @amirrustam
Realtime Reloading @amirrustam
Flake-free, consistent, and reliable. @amirrustam
How are commands executed? 1 2 3 @amirrustam
⚙ 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
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
3 cypress open Great for everyday development workflow Cypress +
Editor Side-by-Side TDD Nirvana cypress run --record Video Recordings of Tests @amirrustam
Cypress Dashboard - Great for CI @amirrustam
cypress run --record --parallel Introducing Parallelization Now available in Cypress
3.1 @amirrustam
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
Previous Spec Test Runs Spec Test Duration History Test Duration
(seconds) The Future Automatic Load Balancing of Test Specs Duration Forecast @amirrustam
Automatic Load Balancing of Test Specs login.spec.js signup.spec.js widget.spec.js @amirrustam
Cypress Parallelization Easily optimize your CI usage You save a
lot of ⏳ time and money @amirrustam
cypress run --group frontend Introducing Test Run Grouping Now available
in Cypress 3.1
Documentation docs.cypress.io
Best Practices docs.cypress.io @amirrustam
https:!//youtu.be/5XQOK0v_YRE Cypress Best Practices Brian Mann, Creator of Cypress
End to End testing with Cypress By Andrew Van Slaars
egghead.io/courses/end-to-end-testing-with-cypress
docs.cypress.io/examples/examples/tutorials.html Tutorial Videos
Testing Workshop docs.cypress.io/examples/examples/workshop.html
Podcasts docs.cypress.io/examples/media/podcasts-media.html
We are trying to drastically improve the status quo of
testing on the web. @amirrustam
Thank You npm install -D cypress Free. Open Source. MIT
License Follow @amirrustam for link to slides.