Upgrade to Pro
— share decks privately, control downloads, hide ads and more …
Speaker Deck
Sign up for free
Menu
Search
Features
All features
Private URLs
Password Protection
Custom URLS
Scheduled publishing
Remove Branding
Restrict embedding
Deck Collections
Notes
Features
All features
Private URLs
Password Protection
Custom URLS
Scheduled publishing
Remove Branding
Restrict embedding
Deck Collections
Notes
Explore
Featured decks
Featured speakers
Programming
Technology
Storyboards
Explore
Featured decks
Featured speakers
Programming
Technology
Storyboards
Pricing
Search
Sign in
Sign up for free
Cypress_-_e2e_testing_for_Web_in__2019_.pdf
Search
Sponsored
·
Your Podcast. Everywhere. Effortlessly.
Share. Educate. Inspire. Entertain. You do you. We'll handle the rest.
→
Shahjada Talukdar
August 21, 2019
Programming
1.5k
0
Share
Embed
Copy iframe code
Copy JS code
Copy link
Start on current slide
Cypress_-_e2e_testing_for_Web_in__2019_.pdf
Shahjada Talukdar
August 21, 2019
Other Decks in Programming
See All in Programming
作れる、でも消せるか?──安全に「枯らして消す」機能削除術 / Drain, Then Delete
chobishiba
2
1.2k
Compiling a real-world CLI tool to native with Static Hermes
tmikov2023
0
130
Vue.jsで作る空間解析アプリとCapacitorプラグインのData Bridge
hal_spidernight
1
120
[JA] Domain Modeling with Vanilla Rails: 「操作」から再考するRailsの設計論
yasaichi
4
1.1k
PumaからFalconに移行したRailsアプリケーションでの実践
falcon8823
0
260
ActionController meets Protocol Buffers
sorah
1
730
見えないものを探る要求要件定義に必要な基本的思考 / invisible-requirement-thinking
minodriven
15
8.8k
【加筆修正版】Laravel のアプリケーションをどこにデプロイするか #phpcon_ehime
akase244
0
160
コードで差別化できない時代の ソフトウェアエンジニアリング / Software Engineering in an Era Where Code Doesn’t Differentiate
kishida
2
200
Zero-Tap Sign-In対応、結局何をすればいいの?
mitohato14
0
990
動画プレイヤーはなぜカクつくのか 〜Flutterのレンダリングとネイティブの境界を解剖する〜
naruogram
0
170
Seven New Principles of Software Engineering
yegor256
0
350
Featured
See All Featured
Why You Should Never Use an ORM
jnunemaker
PRO
61
10k
Marketing Yourself as an Engineer | Alaka | Gurzu
gurzu
0
330
B2B Lead Gen: Tactics, Traps & Triumph
marketingsoph
1
290
Fantastic passwords and where to find them - at NoRuKo
philnash
53
4k
Why Our Code Smells
bkeepers
PRO
340
58k
16th Malabo Montpellier Forum Presentation
akademiya2063
PRO
0
430
Done Done
chrislema
187
17k
Intergalactic Javascript Robots from Outer Space
tanoku
273
28k
Exploring the Power of Turbo Streams & Action Cable | RailsConf2023
kevinliebholz
37
6.6k
Building an army of robots
kneath
307
47k
実際に使うSQLの書き方 徹底解説 / pgcon21j-tutorial
soudai
PRO
203
77k
Evolution of real-time – Irina Nazarova, EuRuKo, 2024
irinanazarova
9
1.6k
Transcript
Cypress - e2e testing for Web in 2019 21.08.2019
Shahjada Talukdar Senior Software Engineer @eBay
What is Cypress? JavaScript e2e Testing Framework
Why we need another tool? Selenium, Robots
Limitations of Selenium • Old(2004) and was not built for
the today’s modern webapps • Slow, flaky tests, not stable enough
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
Objective ( to solve the problem ) To have a
testing environment with possibly fewer flaky tests and faster & easier dev experience.
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.
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 ).
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
• https://www.cypress.io/how-it-works
Old Team, Old App and We have 50 developers, what
to do? npm install
Initiate cypress for an existing app cypress open
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
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
Demo
Features of Cypress
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.
Real time reloads Cypress automatically reloads whenever you make changes
to your tests. See commands execute in real time in your app.
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.
Automatic waiting Never add waits or sleeps to your tests.
Cypress automatically waits for commands and assertions before moving on. No more async hell.
Network traffic control - Easily control, stub, and test edge
cases without involving your server. You can stub network traffic however you like. - Fixtures
Screenshots and videos - View screenshots taken automatically on failure,
or videos of your entire test suite when run headlessly. - Screenshots using API
Selectors Playground
Environment Variables
Dashboard in Cypress
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.
None
Thank you Shahjada Talukdar https://shahjada.me https://twitter.com/destro_mas
Questions and discussions