lecture 19 of 200 completed

A suite you can trust

Two problems make a green suite untrustworthy: tests that race the app, and tests that depend on each other.

What you'll learn

  • The two problems that make a green suite untrustworthy
  • Why tests must not depend on each other's data
  • How to keep tests independent from the first day

A test can pass and still be a problem. Let me show you the two ways that happens, because you will meet both.

Problem 1: the test races the app.

This is the fixed pause from the waiting lecture. A test with waitForTimeout(400) passes on your fast laptop and fails on the slower build server, maybe once in ten runs.

What makes this dangerous is not the failure. It is what the team learns. They see red, they re-run the build, it goes green. After a month, everyone re-runs red builds without looking at them.

members only

Keep reading with the full course

The Foundations track and the first 5 lectures of each framework are free. This lecture is part of the paid course, which unlocks every lecture, all three frameworks, and downloads.

See the options →