merging result of integration test and unit test

30 views
Skip to first unread message

lvhu...@gmail.com

unread,
Oct 23, 2019, 6:20:14 AM10/23/19
to JaCoCo and EclEmma Users
hi,

We are using the ant command (with a build.xml config file) for api integration test, and using the mvn command (with modified pom.xml file) for unit test. Both work fine and can generate reports.

Now we want to merge these two together. Why? We assume that some code are covered by the integration test, some other code are covered by the unit test. Of course, some code are probably covered by both tests. We'd like to get an overall coverage report, no matter covered by which test.

I'm thinking of using the 'ant ... merge' command to merge all the .exec files generated by both tests, and then using the 'ant ... report' command generate the reports. But I have two questins.

1. The 'ant ... merge' command does generate a result .exec file, but does it contain the correct date? For example, if some code are covered by both types of test, can the result be merged correctly here?

2. The build.xml file used in 'ant ... report' command specifies the class files and the source code location. I tried using the build.xml used for integration test, and did get the reports. I guess this is ok, assuming the code used for unit test is the same version as that for integration test?

Thanks.
--huafeng

Marc Hoffmann

unread,
Oct 23, 2019, 6:31:17 AM10/23/19
to JaCoCo and EclEmma Users
Hi Huafeng,

1. The 'ant ... merge' command does generate a result .exec file, but does it contain the correct date? For example, if some code are covered by both types of test, can the result be merged correctly here?

Yes -- if the same class files are used for both tests

2. The build.xml file used in 'ant ... report' command specifies the class files and the source code location. I tried using the build.xml used for integration test, and did get the reports. I guess this is ok, assuming the code used for unit test is the same version as that for integration test?

Correct. For report generation you need to supply the exact same class files as used in both test scenarios.

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/6efbf509-5e34-48e4-af9f-b1c3c9618156%40googlegroups.com.

lvhu...@gmail.com

unread,
Oct 23, 2019, 6:46:14 AM10/23/19
to JaCoCo and EclEmma Users
Thanks Marc!
To unsubscribe from this group and stop receiving emails from it, send an email to jac...@googlegroups.com.
Reply all
Reply to author
Forward
This conversation is locked
You cannot reply and perform actions on locked conversations.
0 new messages