In software testing, test coverage measures the amount of testing performed by a set of test. It will include gathering information about which parts of a program are actually executed when running the test suite in order to determine which branches of conditional statements have been taken.
In simple terms, it is a technique to ensure that your tests are actually testing your code or how much of your code you exercised by running the test.
What Test Coverage does
- Finding area of a requirement not implemented by a set of test cases
- Helps to create additional test cases to increase coverage
- Identifying a quantitative measure of test coverage, which is an indirect method for quality check
- Identifying meaningless test cases that do not increase coverage
How Test Coverage can be accomplished?
- Test coverage can be done by exercising the static review techniques like peer reviews, inspections and walkthrough
- By transforming the ad-hoc defects into executable test cases
- At code level or unit test level, test coverage can be achieved by availing the automated code coverage or unit test coverage tools
- Functional test coverage can be done with the help of proper test management tools
Benefits of Test Coverage
- It can assure the quality of test
- It can help identify what portions of the code were actually touched for the release or fix
- It can help to determine the paths in your application that were not tested
- Prevent defect leakage
- Time, scope and cost can be kept under control
- Defect prevention at an early stage of project life cycle
- It can determine all the decision points and paths used in the application, which allows you to increase test coverage
- Gaps in requirements, test cases and defects at unit level and code level can be found in an easy way
Read more - http://www.guru99.com/traceability-matrix.html