Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Running jacocoReport

I'm using Gradle 1.7 and Jacoco plugin. My project uses Java and Scala plugins.
When I run gradlew -i clean jacocoTestReport

Report is not created and I see in the log

:bl:jacocoTestReport (Thread[Daemon Thread 13,5,main] - start :bl:jacocoTestReport Skipping task ':bl:jacocoTestReport' as task onlyIf is false. :bl:jacocoTestReport SKIPPED :bl:jacocoTestReport (Thread[Daemon Thread 13,5,main]) - complete 

What does it mean? Why report is not created?

like image 433
Pavel Bernshtam Avatar asked Nov 17 '13 15:11

Pavel Bernshtam


People also ask

How do I run JaCoCo code coverage?

To get code coverage reports in a Maven project, we first need to set up the JaCoCo Maven plugin for that project. By integrating the JaCoCo plugin, the results of the code coverage analysis can be reviewed as an HTML report. The current version of the JaCoCo-Maven plugin can be downloaded from the MVN Repository.

What is jacocoTestReport?

JaCoCo Report configurationThe JacocoReport task can be used to generate code coverage reports in different formats. It implements the standard Gradle type Reporting and exposes a report container of type JacocoReportsContainer.

What is difference between JaCoCo and SonarQube?

JaCoCo vs SonarQube: What are the differences? JaCoCo: A code coverage library for Java. It is a free code coverage library for Java, which has been created based on the lessons learned from using and integration existing libraries for many years; SonarQube: Continuous Code Quality.


1 Answers

The task will only run if coverage data is available. You can make sure of that by also running the test task.

like image 180
Peter Niederwieser Avatar answered Sep 19 '22 04:09

Peter Niederwieser