Skip to content

Condition coverage in software testing: meaning and examples

Condition coverage is reached when every atomic condition inside a decision has taken both the value TRUE and the value FALSE during the tests. It looks inside the expression, but not at how each condition affects the result.

A condition is a Boolean sub-expression with no Boolean operator inside it: armed, door, window. Condition coverage requires each one to be true in some test and false in another, which two well-chosen test cases can achieve for any number of conditions by flipping them all at once. That is its weakness: it can be satisfied without the decision ever changing value, and without any condition being shown to matter. Multiple condition coverage, at the other extreme, requires every combination, the full truth table.

The artefact on this page is armed AND (door OR window), true on rows 5, 6 and 7. The two cases armed = TRUE, door = FALSE, window = TRUE and armed = FALSE, door = TRUE, window = FALSE give every condition both values, reaching condition coverage, while door is never shown to affect the alarm. The engine's independence pair for door shows what MC/DC adds: armed = TRUE, door = FALSE, window = FALSE against armed = TRUE, door = TRUE, window = FALSE, the alarm going from FALSE to TRUE with only door changed.

Condition coverage appears in coverage tool reports and in the ISTQB syllabus as the step between decision coverage and MC/DC. In practice it is rarely a target on its own, because the combined criterion, condition/decision coverage, costs the same two tests and adds the decision outcome. The term is confused with decision coverage (the whole expression) and with MC/DC, which is condition coverage plus the independence requirement.

Example

alarm := armed AND (door OR window) · output

Exact checks

Always true (tautology)? No Counterexample: armed = F, door = F, window = F · Exhaustively checked and solver cross-checked · 1 rows
Always false (contradiction)? No Counterexample: armed = T, door = F, window = T · Exhaustively checked and solver cross-checked · 6 rows
Can be true? Yes Example assignment: armed = T, door = F, window = T · Exhaustively checked and solver cross-checked · 6 rows

Truth table (8 rows)

Condition coverage in software testing: meaning and examples
#armeddoorwindowalarm
0FALSEFALSEFALSEFALSE
1FALSEFALSETRUEFALSE
2FALSETRUEFALSEFALSE
3FALSETRUETRUEFALSE
4TRUEFALSEFALSEFALSE
5TRUEFALSETRUETRUE
6TRUETRUEFALSETRUE
7TRUETRUETRUETRUE

Plain-language reading

Beginneralarm is true exactly when both of the following hold:
1. armed is true
2. at least one of door or window is true (both may be true)
In every other case, alarm is false.
About the operators:
- AND is true only when all of its parts are true.
- OR is inclusive: it is true when at least one part is true, including when several are.
Intermediatealarm is true exactly when both of the following hold:
1. armed is true
2. at least one of door or window is true (both may be true)
In every other case, alarm is false.
Advancedalarm is true exactly when both of the following hold [conjunction ∧]:
1. armed is true
2. at least one of door or window is true (both may be true) [inclusive disjunction ∨]
In every other case, alarm is false.
Formal notation: armed ∧ (door ∨ window)

MC/DC

InputStatusIndependence pair (only that input changes)
armedfoundarmed=F, door=F, window=T → F  |  armed=T, door=F, window=T → T
doorfoundarmed=T, door=F, window=F → F  |  armed=T, door=T, window=F → T
windowfoundarmed=T, door=F, window=F → F  |  armed=T, door=F, window=T → T

The common slip

Assuming condition coverage implies decision coverage. Two tests can flip every condition while the decision stays FALSE both times, as armed = TRUE, door = FALSE, window = FALSE and armed = FALSE, door = TRUE, window = TRUE do for this alarm. Each criterion must be checked on its own.

Questions

What does MC/DC add to condition coverage?

The requirement that each condition be shown to independently change the decision: a pair of tests differing only in that condition with different outcomes. The independence pairs on this page are those tests, one pair for each of armed, door and window.

Related

See also

Glossary

Generated from the Tangibool engine, semantics tangibool-semantics/1, engine 1.0.0, build . Every table, map, simplification and verdict on these pages was computed by the Tangibool engine when the site was built, and every claim was re-checked by the same exact checker the app uses. Limits are stated where they apply. © 2026 Foreranger LTD.