Coverage when source is spreaded over mutliplie modules

32 views
Skip to first unread message

gofh...@googlemail.com

unread,
Jul 11, 2017, 6:56:56 AM7/11/17
to JaCoCo and EclEmma Users
Steps to reproduce

JaCoCo version: 0.7.9
Operating system: Ubuntu 16.04
Tool integration: Maven

Project setup:
root
|- entity module
|- logic module with unit tests
|- rest module
|- client with integration tests

every module calls the maven goals prepare-agent and report.
Then the last module client, calls the report-aggregate.


Expected behaviour

Coverage is generated from all modules

Actual behaviour

only the entity module is covered, rest is only covered when unit tests cover the code

Evgeny Mandrikov

unread,
Jul 11, 2017, 8:46:37 AM7/11/17
to JaCoCo and EclEmma Users, gofh...@googlemail.com
Duplication of https://github.com/jacoco/jacoco/issues/563 without additional details in pointless - as was already said in it: 

please make sure to provide fully complete example demonstrating your difficulty

There are plenty of working examples of such scenario in internet. And without details about your exact setup you are not gonna get any valuable response, even maybe no response at all, not even counting that polite people say "hi" before starting conversation. You've been warned.

As a best guess and the last answer from me in absence of details from you: please pay an attention on the way you execute integration tests: "prepare-agent" goal ( http://www.jacoco.org/jacoco/trunk/doc/prepare-agent-mojo.html ) prepares a property pointing to the JaCoCo agent that should be passed as a VM argument to the application under test, this happens automatically in case of execution of unit tests with maven-surefire-plugin , but maybe not the case in your way of execution of integration tests.
Reply all
Reply to author
Forward
This conversation is locked
You cannot reply and perform actions on locked conversations.
0 new messages