A test fails on the build server. You run it on your machine a hundred times, and it passes every time. The machine it failed on no longer exists. All you have is what the run recorded.
Guessing wastes days here. A method does not. This lecture is that method.
Reading example. Harbour Ferries is a fictional ferry timetable app. You can read these examples here.
Start by sorting the failure into one of four kinds. Each kind has a different next step.
- It fails alone, every time, but only on the build server. Something about the environment differs. This kind is usually the easiest to fix.
- It passes alone, but fails when the whole suite runs. Another test is changing something this test depends on. The environment does not matter.
- It fails now and then, everywhere, including on your machine. A race: two things happen in an order that is usually right and sometimes wrong.
- It started failing on a certain day. Something changed. Find the change.