? QA Design Gurus: Do you care about your application code (Code Coverage)? Have your tests covered 100% of Code (Test Coverage)?

Mar 28, 2015

Do you care about your application code (Code Coverage)? Have your tests covered 100% of Code (Test Coverage)?




Code Coverage refers to the number of lines of code being exercised when application is running. Test coverage refers to the test cases that are written against to the Requirement Document. Both are important to the Quality Assurance Personnel to get the indication of how thoroughly your product has been tested.
Measuring code coverage is a technique for understanding exactly which application code is being exercised. There are tools that can be used to indicate which code is being exercised when running through tests cases. For example, there was a code path that would be executed only in case of error condition. We should write the test case to simulate the error condition and then verify the error message was displayed. This type of testing refers to the white box testing. You need to see the application code in order to assess the code coverage.
In my opinion, code coverage metrics gives us an important insight how effective our tests and what parts of the source code are thoroughly exercised. You can look at code coverage report and find out specific code areas which are not exercised by your tests. By Doing Code Coverage, You can add new test cases or modify existing test cases to get cover all areas of your application.
Test coverage often refers to the set of test cases that are written against to requirement specification document .This would be the block box testing and not required to go through the code to write test cases.
Benefit of code coverage measurement:
·         To identify areas in the source code where test cases need to be added so that test case coverage can improve.
·         It helps in determining the quality of the product by measuring of code coverage
·         Ensuring that testing is completely exercising the complete application with planned and exploratory tests.
·         To cover all the workflows in terms of decision tress in the code.
·         Increased confidence for Product release.

No comments:

Post a Comment