Combines Cobertura with the awesomeness of crap4j
dlindner/crapertura
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Folders and files
Name | Name | Last commit message | Last commit date | |
---|---|---|---|---|
Repository files navigation
An ant task that reads cobertura (http://cobertura.sourceforge.net) test coverage data and outputs a crap4j (http://www.crap4j.org) metric report. Read more about the motivation and background information at http://schneide.wordpress.com/2010/09/27/combine-cobertura-with-the-awesomeness-of-crap4j/ = 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"> <classpath> <fileset dir="${crapertura.home}"> <include name="**/*.jar" /> </fileset> </classpath> </taskdef> == Details for 2. == - Include this into your ant script and set the parameters. - ${cobertura.report.file} has to point to the XML report file of cobertura - ${crapertura.report.directory} has to point to the output directory for the crap4j-like result report - ${classes.directory} has to point to your compiled, but unpackaged class files (.class) <crapertura coberturaReportFile="${cobertura.report.file}" targetDirectory="${crapertura.report.directory}" classesDirectory="${classes.directory}" /> = 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 http://www.crap4j.org/faq.html = 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!
About
Combines Cobertura with the awesomeness of crap4j
Resources
Stars
Watchers
Forks
Releases
No releases published
Packages 0
No packages published