The Author Online Book Forums are Moving

The Author Online Book Forums will soon redirect to Manning's liveBook and liveVideo. All book forum content will migrate to liveBook's discussion forum and all video forum content will migrate to liveVideo. Log in to liveBook or liveVideo with your Manning credentials to join the discussion!

Thank you for your engagement in the AoF over the years! We look forward to offering you a more enhanced forum experience.

MikeHT (137) [Avatar] Offline
When I try to run goal

mvn jacoco:report

in the spring-standalone-swing project I get the following error

[INFO] Skipping JaCoCo execution due to missing execution data file:/Users/mht/JavaTestingWithSpock/code/java-testing-with-spock-master/chapter7/spring-standalone-swing/target/jacoco.exec

Does anyone know the solution?

Note if you create the file target/jacoco.exec, the task will run, but no output is generated. If you create the file target/jacoco.exec and run gradle jacocoTestReport, you will get files target/site/jacoco.csv and target/site/jacoco.xml
Kostis Kapelonis (63) [Avatar] Offline

Apparently the full command is not in the book. The Jacoco report assumes that the tests have run at least once.

Try running
mvn test jacoco:report

This should work!