Line Coverage

Test Effectiveness Low oracle

Did we execute this line? Useful but weak. A project can have 90% line coverage while mutation testing finds large numbers of mutations that tests don’t detect.

Coverage measures execution. An assertion measures correctness. These are not the same thing.

Sensor properties

Property Value
Oracle strength Low — execution is not correctness
Independence Low — same author writes tests
Scope Line-level
Feedback latency Seconds
Actionability Guiding — shows which lines weren’t executed
Type Predictive

What it cannot detect

Whether the code that executed was actually asserted on. A line can execute without any test verifying its output. This is why coverage alone is a weak oracle.

Related sensors

Categories: Test Effectiveness Coverage