Why assertions that pass don't always mean your app works (false positives & false negativesin tests)

Why assertions that pass don't always mean your app works (false positives & false negativesin tests)

False positives and false negatives are two of the most dangerous issues in your tests as they mean your tests are asserting broken code as correct.

And they are very easy to slip in, without noticing even after going through pull-request review.

What Are False Positives/False Negatives?

False Positive (False Pass): A test that passes even though the code is broken. The test incorrectly reports that everything is fine when there's actually a bug.

False Negative (False Failure): A test that fails even though the code is working correctly. The test incorrectly reports a problem that doesn't exist.

Loading full lesson...

Share this lesson with your teamTweet (X) it

Invite a teammate to learn with you by sharing this lesson or dropping the link in your team chat.