? QA Design Gurus: Code Coverage – Measure the quality of your testing

Aug 23, 2015

Code Coverage – Measure the quality of your testing

Many of you (testing guys) may have already heard of code coverage and related tools. However, let’s talk about why do we need code coverage, how does it helps and when do we need to do code coverage analysis.

Code Coverage Analysis helps finding more bugs in our application code by finding the areas which are not being covered in our testing. It measures how many lines/blocks/arcs of our code are executed while the automated tests are running. And the coverage is collected by using specialized tools to instrument the binaries to add tracing calls and run a full set of automated tests against the instrumented product. A good tool will give us not only the percentage of the code that is executed, but also will allow us to drill into the data and see exactly which lines of code were executed/not executed during particular test which inturn gives us the test cases missing.

There are many tools available in market that can be used to indicate which code is being executed when running through test cases, for example in our company, we use Clover for all our Java based applications and Pure Coverage for C/C++ based applications. Code Coverage is a white box testing which can be executed mostly at testing phases like regression or integration testing.



No comments:

Post a Comment