You've been invited into the Kudos (beta program) private group. Chat with others in the program, or give feedback to Atlassian.
View groupJoin the community to find out what other Atlassian users are discussing, debating and creating.
Team,
I want to exclude the test code from my coverage report. While building the code itself I have restricted the instrumentation. But still the test code is comping in the application code and showing the coverage percentage as 0%. My coverage report is showing 25% with test code 0%. Is it correct coverage report percentage? My goal is skip the test coverage % from actual coverage report.
Also, I could see the test codes are not instrumented.
build.xml
<target name="with.clover">
<mkdir dir="ins-clover" />
<mkdir dir="cloversrc" />
<copy todir="cloversrc">
<fileset dir="src">
<exclude name="x/y/automation/**"> </exclude>
<exclude name="x/y/**Test**"> </exclude>
</fileset>
<fileset dir="test">
<exclude name="x/y/x/**"></exclude>
<exclude name="x/y/z/**"> </exclude>
</fileset>
</copy>
<clover-instr initString="${clover.db.dir}/master_coverage.db" srcdir="cloversrc" destdir="ins-clover">
</clover-instr>
</target>
In general Clover shows 2 types of coverage:
Clover detects your test code with test detection algorithm, which you can modify with using testsources
settings or here. You can exclude test sources from instrumentation, but doing that you'll loose some of the metrics, e.g Per-Test Coverage. But if you still want to do that, then:
cloversrc
directory between runs, if not then there might be some old data which causes your problemsmaster_coverage.db
between runs? if not then old instrumentation information might be included in the databasewhat do you mean by:
<exclude name="x/y/**Test**"> </exclude>
I'd rather expect something like this:
<exclude name="x/y/**/*Test*"> </exclude>
Remember that all fileset patterns are resolved from project root, so you may need to modify the patterns to include it:
<exclude name="**/x/y/**/*Test*"> </exclude>
cloversrc
G’day everyone! Super exciting news coming from the Marketplace. We have now fully rolled out the ability for end-users to submit app requests to admins directly from within the product! No longer ...
Connect with like-minded Atlassian users at free events near you!
Find an eventConnect with like-minded Atlassian users at free events near you!
Unfortunately there are no Community Events near you at the moment.
Host an eventYou're one step closer to meeting fellow Atlassian users at your local event. Learn more about Community Events
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.