Cobertura reports in the build.
-------------------------------
Key: QI-326
URL: http://issues.ops4j.org/browse/QI-326
Project: Qi4j
Issue Type: Improvement
Reporter: Niclas Hedhman
Priority: Minor
The cobertura reports should be built and aggregated at the root, which can be
done with;
{code}
build.doLast() {
def cobSerFile = "${project.buildDir}/coverage/cobertura.ser"
ant {
taskdef(name: 'coberturaReport',
classname: 'net.sourceforge.cobertura.ant.ReportTask',
classpath: configurations.testRuntime.asPath)
taskdef(name: 'coberturaMerge',
classname: 'net.sourceforge.cobertura.ant.MergeTask',
classpath: configurations.testRuntime.asPath)
coberturaMerge(datafile: cobSerFile) {
childProjects.each { entry ->
def project = entry.value
if (!project.name.contains('-sample-')) {
fileset(dir: project.buildDir, includes: 'coverage/cobertura.ser')
}
}
}
// create cobertura report
coberturaReport(destdir: buildDirName + "/reports/cobertura",
format: 'html', datafile: cobSerFile) {
childProjects.each { entry ->
def project = entry.value
fileset(dir: project.projectDir.absolutePath + '/src/main/packages') {
include(name: '**/*.java')
}
}
}
// create Junit report
def junitReportDir = buildDirName + "/reports/junit"
mkdir(dir: junitReportDir)
mkdir(dir: buildDirName + "/test-results")
'junitreport'(todir: junitReportDir) {
report(format: 'frames', todir: junitReportDir)
childProjects.each { entry ->
def project = entry.value
fileset(dir: project.buildDir.absolutePath + '/test-results') {
include(name: "TEST-*.xml")
}
}
}
}
}
{code}
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
http://issues.ops4j.org/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira
_______________________________________________
qi4j-dev mailing list
[email protected]
http://lists.ops4j.org/mailman/listinfo/qi4j-dev