Jacoco Maven Plugin and Junit5

138 views
Skip to first unread message

Pankaj Bharambe

unread,
Oct 21, 2021, 6:31:20 PM10/21/21
to JaCoCo and EclEmma Users
Hello Team,

I have couple of question on Jacoco Maven Plugin. 

I am getting below issue when I run mvn verify command from Jenkins.

[INFO] Connecting to localhost/127.0.0.1:9100 

[INFO] Connection refused (Connection refused) 

I am getting above error when - 

Spring Boot : 2.5.5
Jacoco : 0.8.2
Failsafe : 2.22.2
Surefire : 2.22.2
Junit5
Java8

1. I am using surefire and failsafe maven plugin along with jacoco in my Spring Boot App. Does Jacoco maven plugin depends on any other plugin version like surefire, failsafe and Spring Boot?

2. If that the case what would be the versions should use?

3. Does Jacoco supports Junit5 test cases?

Why I am asking above questions because when I use below versions in my app - 

Spring Boot : 2.1.8
Jacoco : 0.8.2
Failsafe : 2.13
Surefire : 2.15
Junit4
Java8

I am able to run integration test successfully and able to publish the coverage in Jenkins.

Marc Hoffmann

unread,
Oct 29, 2021, 6:05:52 AM10/29/21
to jac...@googlegroups.com
Hi Pankaj,

1. I am using surefire and failsafe maven plugin along with jacoco in my Spring Boot App. Does Jacoco maven plugin depends on any other plugin version like surefire, failsafe and Spring Boot?

No, JaCoCo has no dependencies on those tools or frameworks.

3. Does Jacoco supports Junit5 test cases?

JaCoCo works on any code executed in a JVM. It does not depend on specific test framework.

Hard to tell what your specific problem is without looking at the code base. Also it is not clear to me how the error message relates to JaCoCo? Are you using tcpclient mode or so? Normally this is not possible in a Maven build.

We provide working examples in our documentation. Maybe you start from here: https://www.jacoco.org/jacoco/trunk/doc/

Regards,
-marc


--
You received this message because you are subscribed to the Google Groups "JaCoCo and EclEmma Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to jacoco+un...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/jacoco/3ffb1439-4d8f-43fe-816a-81e196a3d629n%40googlegroups.com.

Reply all
Reply to author
Forward
0 new messages