Ho provato a ottenere la copertura del codice in un progetto spring-gradle usando il plugin gradle jacoco.gradle jacocoTestReport non funziona?
Il build.gradle contiene il seguente
apply plugin: "jacoco"
jacoco {
toolVersion = "0.7.1.201405082137"
reportsDir = file("$buildDir/customJacocoReportDir")
}
jacocoTestReport {
reports {
xml.enabled false
csv.enabled false
html.destination "${buildDir}/jacocoHtml"
}
}
Allora ho fatto funzionare
gradle test jacocoTestReport
Se dopo solo il file test.exec viene generato nella cartella build/report.
Oltre a ciò non succede nulla.
Come posso ottenere il rapporto HTML?
controlla anche questo: http://csiebler.github.io/blog/2014/02/09/multi-project-code-coverage-using-gradle-and-jacoco/ –