0
-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測試來計算代碼覆蓋的代碼覆蓋率。查找在不同maven項目中編寫的單元測試和集成測試的組合代碼覆蓋
你使用maven中的任何插件? –
是的,我正在使用Spring Roo所需的所有插件和依賴項。使用的插件是項目A的tomcat7-maven-plugin,maven-shade-plugin,maven-compiler-plugin,maven-surefire-plugin,項目B的maven dependency插件,surefire插件,編譯器插件,build-helper-maven-plugin另外,我使用Swagger作爲REST-API(project-A)的接口作爲測試控制檯。 –
看看https://maven.apache.org/surefire/maven-surefire-plugin/ –