The million dollar question which every Manager asks to testing teams is that ‘Whether they have executed all the test cases ? “. If you are a software test practitioner, you would be feeling really frustrated. How on earth, can you ever execute all the ‘Test Cases’ for a particular feature.
Well, there is no silver bullet but there is a way which you can use to get a good enough answer for the above question. Its called ‘Code Coverage’ analysis.
How does it work
There are certain software tools in the market which can be used to do ‘Code Coverage’. One of the popular software is ‘Bullseye’. The process is simple. While building binaries for your software program, configure ‘Bullseye’ with the IDE. When binaries are made, bullseye inserts some of its own signatures. This is called ‘Instrumentation’ of the code.
Once a binary has been instrumented, just exercise the features of the program. As you use the program, a ‘coverage’ file gets created and updated. This ‘coverage’ file has the information on the lines of code which are getting executed. After you are done, analyze this coverage file using Bullseye and you would get details on ‘how much code has been covered’. So if you run your whole test-suite then you would get the coverage for that test-suite.
How to interpret results
If you have a 100% coverage then something is wrong because then you are doing something which is so perfect. For a real life full blown software application, 100 % is not possible and not desirable as well. Code coverage reports helps you in two ways.
1. It helps you to find the ‘dead code’, the code which is never executed.
2. It helps you to find the areas within the code for which no testcase has been executed.
To keep it short, I would stop here but feel free to ask anything by writing a comment.