OhMyBug

tests/ci

Condition Tested For One Outcome

#31common242 sightingsfirst seen September 2026

What goes wrong

A true/false condition — a filter, a guard, an 'only active' rule — is tested only on inputs where it passes (or only where it rejects): the test data holds rows it keeps and none it must drop, or asserts refusal and never success. Making the condition always-true, deleting it, or widening it to refuse too much keeps every test green.

Example

A test of the 'active users only' filter feeds three active users and checks all three come back; delete the filter and the test still passes.

Not to be confused with

The condition runs but only one of its two outcomes is ever observed; not a numeric limit probed only from inside (Unchallenged Boundary Assertion), not test data that never reaches the condition (Unreached Branch Test), and not a negative case blocked by an earlier refusal (Overdetermined Negative Control).

Discovered by

Field notes · 25