The web has evolved. Finally, testing has too. Cypress is a modern testing tool that answers the testing needs of modern web applications. It has been gaining a lot of traction in the last couple of years, gaining worldwide popularity. If you have been waiting to learn Cypress, wait no more! Filip Hric will guide you through the first steps on how to start using Cypress and set up a project on your own. The good news is, learning Cypress is incredibly easy. You’ll write your first test in no time, and then you’ll discover how to write a full end-to-end test for a modern web application.
6. 👀 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 😅
8. Workshop form - practical challenges
- open your editor and go to
challenge.js
- run it in Cypress
- look at the solution in
challenge_solution.js
16. 📚 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
19. 📚 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
23. 📚 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
27. 📚 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
31. 📚 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
35. 📚 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
39. 📚 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