By the end of this lesson a robot browser will click through your app's most important journeys after every change, and you will be able to watch it, read its report and spot where it failed.
You need: your project with Vitest from Lesson 3, Node.js 22 or newer, Windows 11 or macOS 14 or newer, about 1 GB of free disk space for the test browsers · Time: 9 minutes
Unit tests check rules. An end-to-end test checks a whole journey: what a real person does from start to finish, in a real browser. Playwright is a free tool from Microsoft that opens a browser, clicks, types and checks what appears, much faster than you.
Do not test everything this way. Pick the 3 to 5 journeys that would hurt most if they broke. For Sharma Coaching:
- Log in as the admin.
- Find a student and mark this month's fee as paid.
- Download the monthly fee list as CSV.
Write each journey as steps a person would do, ending with what they must see:
Put in order Put the "mark fee as paid" journey in the right order
Tap the steps in the order you would do them. Tap a placed step to remove it.
- 1
Why?End-to-end tests are slower and need more care than unit tests, so spend them only where a break would cost money or trust: logins, payments, and the main daily task.
Log in free to read the rest of this lesson
Every lesson is free. A free account unlocks all of them and saves your progress.
Still to come in this lesson:
- Let the agent install Playwright
- Record a journey by clicking
- Run it and watch it
- Read the report when it fails
- Recap