Create
cancel
Showing results for 
Search instead for 
Did you mean: 
Sign up Log in

How to configure Historical report in configure using gradle task

saurabh agrawal September 24, 2019

I am able to instrument my code and run manual tests. I have generated html reports and it works fine. I am using gradle to instrument and generate report. 

However, my reports does not show historical comparison and I am not sure how to configure it. Is it even possible in gradle? ost of the articles are about ANt and maven. 

This is gradle instrumentation task 

task startInstrumentation() {
println 'Started Instrumentation'
FileTree tree = fileTree('src').include('**/*.java')
def argsList = ["--initstring", "${buildDir}/clover/clover.db",
"-d", "${buildDir}/sources-instr"]
tree.each {
File file ->
argsList.add(file.absolutePath)
}
String[] args = argsList.toArray()
com.atlassian.clover.CloverInstr.mainImpl(args)
println 'Finished Instrumentation'
}

This is my clover reporting task

task cloverReport() {
inputs.dir "${buildDir}/clover"
outputs.dir "${reportsDir}/clover"
onlyIf {
file("${buildDir}/clover/clover.db").exists()
}
doFirst {
def argsList = ["--initstring", "${buildDir}/clover/clover.db",
"-o", "${reportsDir}/clover"]
String[] args = argsList.toArray()
com.atlassian.clover.reporters.html.HtmlReporter.runReport(args)
}
}

Just want to understand how do i configure my task in gradle to generate historical reports?

0 answers

Suggest an answer

Log in or Sign up to answer
TAGS
AUG Leaders

Atlassian Community Events