"Code coverage" (synonym: test coverage) is a measure of the amount of application source code that has been exercised, usually by some testing regime, often by unit testing.
Code coverage is a measure of the amount of application source code that has been exercised, usually by some testing regime, often by unit testing. There are two key questions: given an exercise regime, how much of the source code is executed (under the assumption that the exercise also shows the program effects to be correct), and, given an exercise regime, how does one increase the coverage amount by modifying the exercise.
Determining the actual coverage is normally accomplished by instrumenting the source code to track when its elements are executed, and then simply running the exercise regime. The instrumented data is collected and often displayed in a report and/or a visual display.
Improving coverage given a specific exercise regime is difficult. One must determine for some block of uncovered code, how to cause that code to be executed, often requiring a complex initialization of the program environment to trigger the code block.
Code coverage is also known as test-coverage, but see that tag's wiki for an alternate meaning.