Jacoco-report + Teamcity

Skip to first unread message

Aleksandr Ermakov

Jan 5, 2024, 4:59:04 AMJan 5
to JaCoCo and EclEmma Users

Environment: TeamCity, mac-mini

Project: multi-module project

Problem: almost empty jacoco-report


I have a problem, when I try to generate a jacoco-report using TeamCity on build-agent mac-mini.
I have a multi-module project and a small custom plugin for running jacoco-tasks. In the beginning the plugin launches gradle-tasks “JacocoReport” for an each module. After all these tasks complete, the plugin launches the last gradle-task “JacocoReport“, using executionData, which equals all exec-files of previous module tasks.

When I run the plugin task from Terminal, a jacoco-report is generated correctly, but if I run this task as Teamcity build step, a report contains only tags “sessionInfo” (doesn’t contain information about coverage).

I also tried next steps:

  1. running the plugin task using Teamcity;

  2. opening the build-agent;

  3. running from Terminal in a folder, which was created at step-1, and then the report becomes correct.

When I run the task, using Teamcity I see “0 classes” in Terminal:
[INFO] [org.gradle.api.internal.project.ant.AntLoggingAdapter] [ant:jacocoReport] Writing bundle 'aaede28deb55c3dd' with 0 classes

Could you, please, tell me why a report is not correct, when I run, using TeamCity?

If more information is needed, I’m ready to send it.

Screenshot 2023-12-26 at 17.51.47.png

Best Regards, 
Reply all
Reply to author
0 new messages