Using TeamCity service message to display code coverage report from Jacoco maven plugin does not work

I am using TeamCity Enterprise 2018.1.3 (build 58658)

 

My project is written in java and maven. jacoco-maven-plugin is defined is the project's pom.xml. We use it to collect code coverage.

The project is running in TeamCity, and I hope TeamCity can display report via service message from the data collected by above jacoco-maven-plugin. But it doesn't seem to work at all.

 

This is one of the message printed out in the project's TeamCity build log:

[14:39:09]i: [Step 2/3] ##teamcity[jacocoReport dataPath='**/target/coverage-reports/exec/jacoco-unit-test.exec' classpath='**/target/classes/**/*.class']

 

Can you help resolve my issue?

 

1
1 comment

Hi,

 

the message format seems correct, the classpath looks quite specific, so it might be worth removing it initially and leaving the default and then seeing whether you need to restrict something afterwards. The default should pick everything up. If that doesn't work, please make sure that the jacoco report is generated by the time the message is posted to the build log.

0

Please sign in to leave a comment.