Svoboda | Graniru | BBC Russia | Golosameriki | Facebook
SlideShare a Scribd company logo
1
How to start
with Cypress
- almost 7 years at Slido
- Mostly test automation
- Cypress ambassador
- filiphric.com - Cypress tips
- Workshops, presentations,
webinars, courses,
streaming, youtube,
consultations
👋 Filip Hric
filiphric.com/workshops
Workshop form
- 📚 Chapter overview
- 👀 Demo
- 󰠁 Practical challenge - try it at home!
- ❓ Q&A continually, use your mic, or in Q&A section
How well do you know Cypress?
👀 Workshop form - demos
- code example, short presentation
- I’ll start in demo_start.js
- finished state in demo_end.js
- notes for everything I plan on saying
are in notes/notes.md
- I tend to improvise 😅
󰠁 Workshop form - practical
challenges
󰠁 Workshop form - practical challenges
- open your editor and go to
challenge.js
- run it in Cypress
- look at the solution in
challenge_solution.js
Important note:
you don’t need to finish all the practical challenges
🔧 Tools we will be using
VS Code
Cypress
Trello app
Database seeding
15
Cypress project &
GUI
Chapter #0:
📚 What you’ll learn
- how to install Cypress
- how does a Cypress project look like
- what is the purpose of different project folders
- how to choose a different browser in Cypress
👀 Demo
18
Creating first test
Chapter #1:
📚 What you’ll learn
- how to write your first test
- what kind of syntax does Cypress use
- how to setup url of the page we want to test
- what are the capabilities of Cypress app
- how to click, type
- what kind of checks does Cypress perform in the
background
👀 Demo
󰠁 Practical challenge
22
Simple assertions
Chapter #2:
📚 What you’ll learn
- how to use .should() command
- beforeEach() hook
- how to check visibility, state, class or number of elements
- what to look out for when making assertions
👀 Demo
󰠁 Practical challenge
26
Chaining and
retrybility
Chapter #3:
📚 What you’ll learn
- how does chaining commands work in Cypress
- how built-in retrying in Cypress works
- how to write effective command chains
- how to write your test if the app is flaky
👀 Demo
󰠁 Practical challenge
30
Chai assertions
Chapter #4:
📚 What you’ll learn
- how to use .then() function
- how to use expect() assertions
- how to make assertions on multiple elements
- how to make Cypress retry assertions on multiple
elements
👀 Demo
󰠁 Practical challenge
34
Http requests
Chapter #5:
📚 What you’ll learn
- how to send an http request
- how to test response from server
- how to set up different attributes
- how to reset Trello app
👀 Demo
󰠁 Practical challenge
38
Intercepting
requests
Chapter #6:
📚 What you’ll learn
- how to watch API requests that our app makes
- how to test those API requests
- how to stabilize a flaky test
- different ways of matching our requests
👀 Demo
󰠁 Practical challenge
42
Installing plugins
Chapter #7:
📚 What you’ll learn
- where to find Cypress plugins
- how to install and use a Cypress plugin
👀 Demo
󰠁 Practical challenge
filiphric.com/workshops

More Related Content

Workshop: Head-to-Head Web Testing: Part 1 with Cypress