Clover's report for different tests

Hello, I need to separate my report to two linked reports (for JUnit and Distributed tests)

I create file for ant to use it in the maven.

<project name="Clover Report" default="current">
  
    <clover-format id="clover.format" type="${type}" orderBy="${orderBy}" filter="${filter}"/>
    <clover-setup initString="${cloverdb}"/>
  
    <clover-columns id="clover.columns">
        <totalChildren/>
        <avgMethodComplexity/>
        <uncoveredElements format="raw"/>
        <totalPercentageCovered format="longbar"/>
    </clover-columns>
  
  
    <target name="historical">
        <clover-report>
            <current outfile="${output}"  summary="${summary}">
                <format refid="clover.format"/>
                <testsources dir="${tests}"/>
                <columns refid="clover.columns"/>
            </current>
            <historical outfile="${historyout}" historydir="${history}">
                <format refid="clover.format"/>
                <columns refid="clover.columns"/>
            </historical>
        </clover-report>
    </target>
  
    <target name="current">
        <clover-report>
            <current outfile="C:\root_cvs\test\azelentsov\clover_prototype_code_coverage\target\site\clover\clover1.xml" title="title1" summary="${summary}">
                <format refid="clover.format"/>
                <testsources dir="${tests}"/>
                <columns refid="clover.columns"/> 
        <fileset dir=""/>
           </current>
            <current outfile="${output}" title="title2" summary="${summary}">
                <format refid="clover.format"/>
                <testsources dir="${tests}"/>
                <columns refid="clover.columns"/>
        <fileset dir=""/>
            </current>
        </clover-report>
    </target>
 
  
</project>

What need me write here that I will get separated JUnit and Distributed test statistic?

1 answer

1 accepted

This widget could not be displayed.

How do you have Clover instrumentation configured for your JUnit and Distributed tests? My suggestion is:

  • in order to have completely separate data, you shall have two independent sets of coverage recording files - so either to create two Clover databases (clover-junit.db + clover-distributed.db, for instance) or to have one Clover database but keep recording files separately (e.g. copy clover.db to different folder during test execution and set -Dclover.initstring.path property at runtime)
  • in order to have JUnits executed locally and Distributed ones with <distributedCoverage> option you have to either instrument code twice (using two profiles, for instance) or instrument once, but enable distributed coverage using runtime properties
  • then as you have two sets of coverage recording files, you can point to them in the <clover-report initstring="/path/to/clover.db"><current>...</current></clover-report> tasks in your report descriptor

See:

Cheers
Marek

Suggest an answer

Log in or Sign up to answer
Atlassian Summit 2018

Meet the community IRL

Atlassian Summit is an excellent opportunity for in-person support, training, and networking.

Learn more
Community showcase
Posted Wednesday in New to Jira

Are you planning to trial, or are currently trialling Jira Software? - We want to talk to you!

Hello! I'm Rayen, a product manager at Atlassian. My team and I are working hard to improve the trial experience for Jira Software Cloud. We are interested in   talking to 20 people planning t...

207 views 3 0
Join discussion

Atlassian User Groups

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!

Find my local user group

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

Groups near you