1. Software Engineering
  2. Code Quality

Code Coverage

Percentage

Represents the percentage of code that is covered by automated tests, which is crucial for ensuring that as much code as possible is tested to identify defects.

Formula

(Number of Lines of Code Tested / Total Lines of Code) * 100

Example

If 800 out of 1,000 lines of code are tested, the code coverage is (800/1000)*100 = 80%.