Mirage Academy · Playwright testing course

Playwright testing course: stable tests for web and AI apps

Your tests either miss real bugs or fail for no reason. This course teaches you to pick the test level on purpose, write stable browser tests with Playwright, remove flakiness and test AI features and agent workflows. Watch it in a minute, then see how a rare flake turns into a red build.

See the courseTry the flake math

The course in a minute

Tests that catch real problems and stay quiet otherwise

Automated Testing, Playwright & AI Quality Engineering builds test suites that catch real problems in web and AI applications, without flakiness.

Still from the intro video for the course Automated Testing, Playwright & AI Quality Engineering
Intro video, 1 min 7 s. Transcript below.
Read the transcript

You ship a web app, maybe with AI features, and your tests either miss real bugs or fail for no reason. This course is for you. Weak suites test at the wrong level, selectors break on every redesign, and AI output goes unchecked. After this course you pick the level on purpose, use stable selectors, and test AI features and agent workflows. Each chapter adds to one loop. You decide what to test and at which level. You write unit, integration and end-to-end tests with Playwright. You remove flakiness and add API, visual and accessibility checks. Then you run it all in CI. In the capstone you build a complete test suite for a SaaS product. If you want tests that catch real problems, enroll and start with chapter one.

One loop, step by step

  1. Decide what to test and at which level
  2. Write unit, integration and end-to-end tests with Playwright
  3. Remove flakiness and add API, visual and accessibility checks
  4. Run it all in CI
  1. 01

    Advanced level

    Listed as Advanced on the course page.

  2. 02

    8 chapters, 40 lessons

    Five lessons in each chapter, with the capstone as chapter 8.

  3. 03

    Who it is for

    Developers and technical product people who work on AI features.

The course's intro video with a play button. Beside it, a dotted rail with the four steps of the course loop, from deciding the level to running everything in CI.

Chapters 1 and 2

Pick the level on purpose

A test at the wrong level is slow, brittle or blind. The first two chapters sort out what to test at the unit, the integration and the end to end level.

Closest to what a user does

  1. End to end
  2. Integration
  3. Unit

Many, small and quick to run

  1. 01

    What to test and at which level

    Lessons: what a test is and what it costs, unit, integration and end to end, choosing the level, what makes a test trustworthy, coverage and mutation.

  2. 02

    Unit and integration tests

    Lessons: boundaries, test doubles, table-driven tests, integration tests with a real database, contract tests.

Three tiers stacked like a pyramid. Unit tests form the wide bottom tier, integration tests the middle one and end to end tests the narrow top tier.

Chapter 3

A browser test, line by line

End to end tests drive a real browser through a journey a user cares about. The chapter asks which journeys, how a test is built, how tests stay apart and how to read a failure.

Settings

SaveSaved

Open, act, assert Example lines in Playwright's own API, not a file from the course.

  1. await page.goto("/settings");
  2. await page.getByTestId("save-button").click();
  3. await expect(page.getByText("Saved")).toBeVisible();
  1. 01

    Which journeys

    Lessons: which journeys, anatomy of a browser test.

  2. 02

    Isolation and reuse

    Lessons: isolation and reuse, test data.

  3. 03

    Reading failures

    Lesson: reading failures.

A drawn browser window with a Save button inside a cyan dotted frame and a Saved message, next to three lines of an example Playwright test: open the page, click the button, expect the message.

Chapter 4 · Try it: flakes compound

How a rare flake becomes a red build

Chapter 4 is about stable selectors and flaky tests. It starts with selectors that survive a redesign, then moves to the arithmetic that turns a rare flake into a daily red build.

Selectors Example lines, not a file from the course.

Breaks on the next redesign

  1. page.locator("div > div:nth-child(3) > span")

Survives it

  1. page.getByTestId("save-button")

A suite of flaky tests

Example arithmetic with invented numbers, not a measurement of any suite.

Tests in the suite
Chance that one attempt flakes
Retries per test
Chance of a red run with no bug
63.3%
Extra re-runs per run
0
Red runs out of 20 a day
12.7

200 tests, 0.5 percent flake chance, 0 retries: a 63.3 percent chance of a red run with no bug, 0 extra re-runs per run, 12.7 red runs out of 20.

  1. 01

    Selector stability

    Lessons: selector stability, waiting.

  2. 02

    Flakes compound

    Lessons: flakes compound, retries and quarantine.

  3. 03

    Root causes

    Lesson: root causes.

Two selector lines side by side, one brittle and one stable. Below them, three choices change a result: how many tests, how often one attempt flakes and how many retries a test gets.

Chapter 5

Four more ways to look at an app

Beyond the click path: the API, the pixels, accessibility and the part automation cannot see.

API

Status codes and repeated requests

Visual

Two screenshots, one difference

Accessibility

Checks a script can run

Not seen

What automation cannot see

  1. 01

    Status codes in API tests

    Lessons: status codes in API tests, repeating requests.

  2. 02

    Visual regression

    Lesson: visual regression.

  3. 03

    Accessibility checks

    Lesson: accessibility checks.

  4. 04

    What automation cannot see

    Lesson: what automation cannot see.

Four tiles: API status codes, a visual comparison of two screenshots with one changed dot, an accessibility check and an eye with a line through it for what automation cannot see.

Chapter 6

Testing AI features and agent workflows

An AI feature may word the same answer in many ways. The chapter asks when to check an exact answer and when to check a property of it.

Question Invented example, not a transcript.

How long do I have to return an item?

  1. Two answers 1: You can return it within 30 days.

    Exact check:Pass

    Property checks:Pass

  2. Two answers 2: Returns are accepted for 30 days after delivery.

    Exact check:Fail

    Property checks:Pass

Exact check

  1. equals "You can return it within 30 days."

Property checks

  • Mentions 30 days
  • Is under 40 words
  • Contains no email address

A scripted modelIn a test, a model that replays fixed replies keeps the run repeatable.

  1. 01

    Exact or property

    Lesson: exact or property.

  2. 02

    Golden sets and noise

    Lesson: golden sets and noise.

  3. 03

    Scripted models

    Lesson: scripted models.

  4. 04

    Trajectories and a change gate

    Lessons: trajectories, a change gate.

A question to an AI assistant and two different answers that are both fine. An exact check passes the first and fails the second. Three property checks pass both. Below, a scripted model replaces the real one in a test.

The evaluation side: the AI evaluation course →Agents worth testing: build AI agents →

Chapter 7

Run it all in CI

Chapter 7 is called Tests in CI and covers fail fast, sharding, caching, required checks and merge queues, and reading reports.

  1. Shard 1
  2. Shard 2
  3. Shard 3
  4. Shard 4

Required checkFail fast

  1. 01

    Fail fast

    Chapter 7, lesson 1.

  2. 02

    Sharding

    Chapter 7, lesson 2.

  3. 03

    Caching

    Chapter 7, lesson 3.

  4. 04

    Required checks and merge queues

    Chapter 7, lesson 4.

  5. 05

    Reading reports

    Chapter 7, lesson 5.

Four dotted lanes labeled as shards run side by side and meet at a required check. In the first lane one dot is cyan and the lane stops there, which stands for failing fast.

The pipeline around it: the Docker and CI/CD course →

Chapter 8

Capstone: a test suite for a SaaS product

One suite for one product, planned by risk and judged by how often it fails for no reason.

  1. 1Plan by risk

    Decide what the suite must protect first.
  2. 2The time budget

    Fit the suite into the time a run may take.
  3. 3The false-red rate

    Measure how often a run fails with no bug.
  4. 4The AI feature gate

    Decide when a change to an AI feature may merge.
  5. 5Review checklist

    Check the whole suite against a list before handing it over.

Open the course: Automated Testing, Playwright & AI Quality Engineering

Five capstone steps as a checklist with a bar that stands for the time budget.

Evaluating AI behavior in depth: the AI evaluation course →

Questions about the Playwright testing course

  • What does the Playwright testing course teach?

    It teaches you to build test suites that catch real problems in web and AI applications without flakiness: choosing the level, writing unit, integration and browser tests, stable selectors, API, visual and accessibility checks, testing AI features and running it all in CI.

  • What do I build in the course?

    The capstone is a test suite for a SaaS product. You plan it by risk, fit it into a time budget, measure its false red rate, gate a change to an AI feature and review the whole suite.

  • How is the course organized?

    It has 8 chapters and 40 lessons, five lessons in each chapter. They run from what to test and at which level through browser tests, flaky tests, API, visual and accessibility checks and AI features to CI and the capstone.

  • Does it cover flaky tests?

    Yes. A whole chapter covers stable selectors, waiting, how flakes compound, retries and quarantine, and root causes.

  • How does it differ from the AI evaluation course?

    This course is about automated tests for web apps and the AI features inside them. The AI evaluation course goes deeper into evaluating AI behavior: datasets, graders, model judges, a regression gate and production monitoring.

  • Is the flake example the one from the course?

    No. It is a small calculation written for this page, with invented numbers. It assumes that attempts are independent, which real flakes often are not.

  • Do I get a certificate?

    We offer certificates, yes, each with a verification code. What a certificate states is Mirage's own word, not a state recognized degree.