Test coverage is the measure of the amount or percentage of testing which is covered by a test set. Its gives information about the part of the system which has been covered in testing while running a test suite. Test coverage is defined as a technique which determines whether our test cases are actually covering the application code and how much code is exercised when we run those test cases.
Note : 100% percent test coverage doesn't means that 100% is tested and system is defect free.
Formula of test coverage :

Test Coverage measurement
Test coverage can be best measured with the following 3 things:
-By mapping the requirements to the test cases.
-By seeing the test case status.
-By code coverage analysis.
Benefit of code coverage measurement:
-We can find the gaps easily in requirements, test cases and defects at an early level and code level.
-Time, scope and cost can be kept under control
-Defect prevention is possible at an early stage of project life cycle
-It can assure the quality of test
-It can help identify what portions of the code were actually touched for the release or fix
-We can create additional test cases for complete coverage
-It helps in finding areas of a program not exercised by a set of test cases
-The test coverage analysis can determine the decision points and important path made in the application which helps us to increase the test coverage.
Drawback of code coverage measurement:
- Drawback of code coverage measurement is that it measures coverage of what has been written, i.e. the code itself; it cannot say anything about the software that has not been written.
- If a specified function has not been implemented or a function was omitted from the specification, then structure-based techniques cannot say anything about them it only looks at a structure which is already there.
Note : 100% percent test coverage doesn't means that 100% is tested and system is defect free.
Formula of test coverage :

Test Coverage measurement
Test coverage can be best measured with the following 3 things:
-By mapping the requirements to the test cases.
-By seeing the test case status.
-By code coverage analysis.
Benefit of code coverage measurement:
-We can find the gaps easily in requirements, test cases and defects at an early level and code level.
-Time, scope and cost can be kept under control
-Defect prevention is possible at an early stage of project life cycle
-It can assure the quality of test
-It can help identify what portions of the code were actually touched for the release or fix
-We can create additional test cases for complete coverage
-It helps in finding areas of a program not exercised by a set of test cases
-The test coverage analysis can determine the decision points and important path made in the application which helps us to increase the test coverage.
Drawback of code coverage measurement:
- Drawback of code coverage measurement is that it measures coverage of what has been written, i.e. the code itself; it cannot say anything about the software that has not been written.
- If a specified function has not been implemented or a function was omitted from the specification, then structure-based techniques cannot say anything about them it only looks at a structure which is already there.