tomcat-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From bugzi...@apache.org
Subject DO NOT REPLY [Bug 52323] New: Cobertura test code coverage support for build.xml and build.properties.default
Date Tue, 13 Dec 2011 13:57:56 GMT
https://issues.apache.org/bugzilla/show_bug.cgi?id=52323

             Bug #: 52323
           Summary: Cobertura test code coverage support for build.xml and
                    build.properties.default
           Product: Tomcat 7
           Version: trunk
          Platform: PC
        OS/Version: Linux
            Status: NEW
          Severity: normal
          Priority: P2
         Component: Packaging
        AssignedTo: dev@tomcat.apache.org
        ReportedBy: mhasko@redhat.com
    Classification: Unclassified


Created attachment 28069
  --> https://issues.apache.org/bugzilla/attachment.cgi?id=28069
the patch, based on revision 1213685

Cobertura (cobertura.sf.net) 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
run.
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
build.properties.default 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 'cobertura.report.format' 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 '${tomcat.build}/coverage'.

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

-- 
Configure bugmail: https://issues.apache.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@tomcat.apache.org
For additional commands, e-mail: dev-help@tomcat.apache.org


Mime
View raw message