Generating JaCoCo report when running integration test with failsafe maven plugin

544 views
Skip to first unread message

mr.sargis...@gmail.com

unread,
Mar 29, 2016, 11:20:22 AM3/29/16
to JaCoCo and EclEmma Users
Hi all,

We are running integration test with failsafe maven plugin with a command "mvn failsafe:integration-test".
When I am running test with mvn failsafe:integration-test command the report is not generated, but when I am running with mvn verify with integration test specific profile it generates fine.
Do you have any experience how to run tests with mvn failsafe:integration-test command and generate JaCoCo report properly?

Thanks!

Marc Hoffmann

unread,
Mar 29, 2016, 12:12:24 PM3/29/16
to jac...@googlegroups.com
Hi,

if you execute

mvn failsafe:integration-test

than exactly this goal is executed -- nothing else. You can specify
another goal for report generation (jacoco:report-integration) or use
the Maven lifecycle to execute multiple goals
(https://maven.apache.org/guides/introduction/introduction-to-the-lifecycle.html).

Regards,
-marc

mr.sargis...@gmail.com

unread,
Apr 2, 2016, 8:58:23 AM4/2/16
to JaCoCo and EclEmma Users
Thanks for answer!
I use maven lifecycle and it worked but in CI cloud test run time was doubled (before it was 55 min now 1 hour 45 min).

what do you mean by saying "specify
another goal for report generation (jacoco:report-integration) "? Can you please specify how it should be done?

Thanks!

On Tuesday, March 29, 2016 at 6:12:24 PM UTC+2, Marc R. Hoffmann wrote:
> Hi,
>
> if you execute
>
> mvn failsafe:integration-test
>
> than exactly this goal is executed -- nothing else. You can specify
> another goal for report generation (jacoco:report-integration) or use
> the Maven lifecycle to execute multiple goals
> (https://maven.apache.org/guides/introduction/introduction-to-the-lifecycle.html).
>
> Regards,
> -marc
>

Marc R. Hoffmann

unread,
Apr 4, 2016, 1:48:50 AM4/4/16
to jac...@googlegroups.com
Hi,

JaCoCo code coverage typically only adds a few percent of runtime
overhead to test execution. I recommend studiying your build logs to
understand what is going on when invoked with different build goals.

There is a separate goal for report-integration, see documentation:
http://eclemma.org/jacoco/trunk/doc/report-integration-mojo.html

Regards,
-marc
Message has been deleted

mr.sargis...@gmail.com

unread,
Apr 5, 2016, 5:26:24 AM4/5/16
to JaCoCo and EclEmma Users
Hi.

Thanks for the answer.

Do you mean that running "mvn jacoco:prepare-agent-integration failsafe:integration-test jacoco:report-integration" should work?

~Sargis

Marc R. Hoffmann

unread,
Apr 5, 2016, 4:45:36 PM4/5/16
to jac...@googlegroups.com
I think this possibly works. Just test it!

Regards,
-marc

mr.sargis...@gmail.com

unread,
Apr 6, 2016, 4:45:09 AM4/6/16
to JaCoCo and EclEmma Users
I tested and it does not work. Do you have any other suggestion how to make JaCoCo work with failsafe:integration-test?

Thanks,
Sargis

Reply all
Reply to author
Forward
This conversation is locked
You cannot reply and perform actions on locked conversations.
0 new messages