Monitor a variety of unit testing and static analysis reports and accumulate statistics that can be plotted to portray development trends.
This package will support interaction between a report directory (as commonly constructed in Gradle Java projects) and a project website to which those reports are regularly copied. The program maintains accumulated statistics (e.g., tests passed and failed, test coverage, number of warning messages issued) is simple .csv files on the course website.
Version 1.4
In settings.gradle:
pluginManagement {
repositories {
ivy { // Use my own CS dept repo
url 'https://www.cs.odu.edu/~zeil/ivyrepo'
}
gradlePluginPortal()
mavenCentral()
}
}
In build.gradle:
plugins {
id 'java'
id 'pmd' // and/or checkstyle, jacoco, spotbugs
id 'edu.odu.cs.report_accumulator' version '1.4'
}
reportStats {
reportsURL = 'https://project/reports/url/'
htmlSourceDir = file('src/main/html') // default value
reportsDir = file('build/reports') // default value
buildID = "12345" // defaults to current date, but can be any run identifier
}
For another example, refer tothe build.gradle
file in the demo
directory of this
repository, which produces the pages here.
The plugin adds a reportStats
task, which will examine the reportsDir
directory for
reports generated by JUnit, Jacoco, PMD, FindBugs, SpotBugs, & Checkstyle.
If found, it extracts one or more point statistics (e.g., # of failures) from
the report. It then checks to see if the website at the reportsURL
has CSV
files from prior runs of this task. If so, it downloads the current CSV file
and appends the new point statistics to it. If not, it creates a new CSV file
to hold the statistics. It also copies all files from htmlSourceDir
into the
reportsDir
.
The intention is that these CSV files will be uploaded together with the other
files in reportsDir
to update the project website.