-Project-A(API)
----src
---main(Main code is written here)
---test(Contains Service layer tests)
---pom.xml
-Project-B(APIClientTests)
----src
---main
---test(Contains Client tests)
---pom.xml
我的项目结构如下所示。我想知道有没有办法通过运行项目A中编写的集成测试和项目B中编写的JUnit测试来计算项目A主要编写的代码的代码覆盖率。
答案 0 :(得分:0)
使用Jacoco和父母pom:
父pom
+Project-A
+Project-B
:
<plugins>
<plugin>
<groupId>org.jacoco</groupId>
<artifactId>jacoco-maven-plugin</artifactId>