camel-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Claus Ibsen">
Subject RE: [SPAM] Re: code coverage reports - cobertura or clover
Date Fri, 22 Aug 2008 15:53:41 GMT
2 years ago I did some hacking on webwork/xwork to get the clover working.
But it was ANT based. But here are a few snippets might come handy.

It was capable of skipping isLogDebug statements. Anyway I guess we have some cobertura bits
in our pom.xml that is useable.

Finding some snippets now:

<target name="" depends="test" description="generate coverage reports" unless="skip.tests">
            <current outfile="${}/clover">
                <format type="html" filter="logDebug,logIsDebugEnabled"/>
        <clover-log filter="logDebug,logIsDebugEnabled"/>

    <target name="clover.historical" depends="" description="generate coverage
historical reports"
        <clover-historypoint historyDir="${build.clover}"/>

            <historical outfile="${}/clover" historyDir="${build.clover}">
                <format type="html" filter="logDebug,logIsDebugEnabled"/>
        <clover-log filter="logDebug,logIsDebugEnabled"/>

        <mkdir dir="${build.clover}"/>
        <clover-setup initString="${build.clover}/coverage.db">
            <statementContext name="logIsDebugEnabled" regexp="[\s]*if[\s]*\([\s]*(log|_log|LOG|_LOG)\.isDebugEnabled.*"/>
            <statementContext name="logDebug" regexp="[\s]*(log|_log|LOG|_LOG)\.debug[\s]*\(.*"/>
                <exclude name="${src.test}/**/*.java"/>

Med venlig hilsen
Claus Ibsen
Skovsgårdsvænget 21
8362 Hørning
Tlf. +45 2962 7576

-----Original Message-----
From: James Strachan [] 
Sent: 22. august 2008 17:42
Subject: [SPAM] Re: code coverage reports - cobertura or clover

2008/8/22 Claus Ibsen <>:
> Hi
> I was wondering if it was possible to setup the CI server to once a week or so to run
unit test with coverage enabled.
> I would love to have this auto generated once in a while to find gaps in our testing
and where we could improve or even prepare for @deprecated obsolete code.
> I have run the reports locally myself some times but I tend to be busy with all kind
of other tickets and wiki documentation that my poor laptop can't run longer unit tests at
the same time ;)

Great idea!

If someone can hack the build to actually run the code coverage
reports, I can setup a nightly build to upload it to Apache.

Am thinking we keep the nightly distro running, whether tests pass or
not - then have a nightly 'site' build which runs all the tests and
includes code coverage?


Open Source Integration

View raw message