Team, I am executing the same package files twice. For example my package contains 10 files. I am running sanity and basic test cases against 10 java instrumented files. If I run alone sanity I am getting 25% and run alone basic test case I am getting 25%. In a single shot I am running both sanity + basic test case. Now the code coverage percentage will be 50% or 25%(because same code is running again). I am getting only 25% code coverage. Can you please give your input why it is giving 25%?
Thanks in Advance.
Are your sanity and basic tests are not mutually exclusive? In other words do they test entirely different parts of your application classes? I'm asking because tests usually overlap each other, thus the summary coverage is usually less than sum of coverage from individual tests.
If you see no difference in coverage after running both sanity and basic tests, then there are two possibilities:
When you ran sanity and basic tests together and generated an HTML report - do you see both sanity and basic test cases on the "Test results" tab? Do you see both sanity and basic test classes on the "Test code" tab?
Code coverage is an metric saying that how much of your code is covered by tests. It doesn't matter how many times with how many tests you'll cover one line of you code base, it's still binary metric for that single line (covered or not). The percentage Clover is calculating is basically saying # lines covered
/ # lines in your instrumented code base
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.