Why is a test coverage type called "code coverage"?

Test coverage is a pretty straightforward term which doesn't need any explanation: how much is something "covered" by tests. Similarly you would use for example snow coverage, to say how much snow a certain area is covered by snow. I have recently come across the term code coverage which is pretty confusing to me as when applied to code itself seems to mean "how much a code is covered by code". It feels like test coverage and code coverage they are actually just two types of test coverages, then why use the correct term for one type and an ambiguous for another type? If the intent is to have different types of test coverages, wouldn't it be clearer and more logically consistent to name them using the pattern "test coverage by..."? Test coverage by functionality (instead of test coverage): to measure how many features, requirements, or user stories are covered by tests Test coverage by execution (instead of code coverage): to measure how many lines, branches, or functions of code are executed during tests

May 8, 2025 - 13:17
 0

Test coverage is a pretty straightforward term which doesn't need any explanation: how much is something "covered" by tests. Similarly you would use for example snow coverage, to say how much snow a certain area is covered by snow.

I have recently come across the term code coverage which is pretty confusing to me as when applied to code itself seems to mean "how much a code is covered by code".

It feels like test coverage and code coverage they are actually just two types of test coverages, then why use the correct term for one type and an ambiguous for another type?

If the intent is to have different types of test coverages, wouldn't it be clearer and more logically consistent to name them using the pattern "test coverage by..."?

  • Test coverage by functionality (instead of test coverage): to measure how many features, requirements, or user stories are covered by tests
  • Test coverage by execution (instead of code coverage): to measure how many lines, branches, or functions of code are executed during tests