Combines Cobertura with the awesomeness of crap4j
Switch branches/tags
Nothing to show
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Failed to load latest commit information.


An ant task that reads cobertura ( test coverage data and outputs a crap4j ( metric report.

Read more about the motivation and background information at

= Basic usage =
1. Define the task in your ant script
2. Use the task, feeding it the cobertura XML report file and your .class files, pointing to an output/target directory

== Details for 1. ==
- Include this into your ant script and set ${crapertura.home} to your crapertura installation directory

<taskdef name="crapertura" classname="com.schneide.crapertura.ant.CraperturaTask">
		<fileset dir="${crapertura.home}">
			<include name="**/*.jar" />

== Details for 2. ==
- Include this into your ant script and set the parameters.
- ${} has to point to the XML report file of cobertura
- ${} has to point to the output directory for the crap4j-like result report
- ${} has to point to your compiled, but unpackaged class files (.class)


= Advanced usage =
There are at least two optional parameters provided for advanced users:
- generateHTMLReport (true/false): If false, will not generate the HTML report, but the crap4j XML file only. Defaults to true.
- crapThreshold (0..MAX_INTEGER): Adjusts the crap threshold of the analysis to the given value. Defaults to 30. See also

= Building for yourself =
- The project is developed with Eclipse (3.6). Just import it and run the build.xml ant script.
- The deployable artifact can be found in the subdirectory "dist".
- You can also run build.xml with ant from the command line.

Enjoy and share your experience!