tomcat-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
Subject DO NOT REPLY [Bug 52323] New: Cobertura test code coverage support for build.xml and
Date Tue, 13 Dec 2011 13:57:56 GMT

             Bug #: 52323
           Summary: Cobertura test code coverage support for build.xml and
           Product: Tomcat 7
           Version: trunk
          Platform: PC
        OS/Version: Linux
            Status: NEW
          Severity: normal
          Priority: P2
         Component: Packaging
    Classification: Unclassified

Created attachment 28069
the patch, based on revision 1213685

Cobertura ( is an opensource Java code coverage tool released
(with in dependencies) under The Apache Software License, Version 1.1 and/or
The GNU General Public License, Version 2.0.

It can assess how much of the codebase was actually executed during a program
If the program run means running the test suite, it will produce results
showing how much of the code the tests cover, potentially discover weak spots.

This patch provides support for Cobertura in the build.xml and files. It introduces four new targets:
 * download-cobertura - downloads and unpacks Cobertura in ${base.path}
 * cobertura-enable - enables Cobertura to be used
 * cobertura-instrument - adds Cobertura instrumentation to compiled bytecode
 * cobertura-report - produces reports from Cobertura results. HTML by default
   (can be overwritten with '' property).

The behavior of this patch doesn't break existing targets in any way.

To use this tool, one simply runs 'ant cobertura-enable test' which will
instrument the compiled classes before running the tests and also supply all
the necessary resources for Cobertura to gather the coverage results.
Once the tests are completed 'ant cobertura-report' will produce lovely HTML
report about the test coverage in '${}/coverage'.

NOTE: Although the result of the test cases should not be affected by
Cobertura, it is not guaranteed.

Configure bugmail:
------- You are receiving this mail because: -------
You are the assignee for the bug.

To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message