lecture 13 of 160 completed

Diagnosing a failure you cannot reproduce

It fails in CI and passes a hundred times locally. A method beats guessing, and this is the method.

What you'll learn

  • How to classify a failure before investigating it
  • How to find the test that broke another one
  • How to reproduce a race by making conditions worse

This is the defining senior skill, so it deserves a method rather than advice.

A test fails on the build server. You run it locally a hundred times and it passes every time. You have no reproduction, and the machine it failed on no longer exists. Everything you get is what was recorded.

Start by classifying the failure. The class determines the investigation.

Class one: it fails alone, consistently, in CI only. Something about the environment differs. This is the most tractable class.

Class two: it passes alone, fails in the suite. Another test is affecting it. Nothing about the environment is relevant.

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 →