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
Thanks for signing up for Jira Ops! I’m Matt Ryall, leader for the Jira Ops product team at Atlassian. Since this is a brand new product, we’ll be delivering improvements quickly and sharing updates...
Connect with like-minded Atlassian users at free events near you!Find a group
Connect with like-minded Atlassian users at free events near you!
Unfortunately there are no AUG chapters near you at the moment.Start an AUG
You're one step closer to meeting fellow Atlassian users at your local meet up. Learn more about AUGs