2.12.3.2. 使用 JVM 系统属性启用路由覆盖范围
您可以开启 JVM 系统属性 CamelTestRouteCoverage
,以启用所有测试案例的路由覆盖范围。这可以在 maven-surefire-plugin
配置中完成:
<plugin> <groupId>org.apache.maven.plugins</groupId> <artifactId>maven-surefire-plugin</artifactId> <configuration> <systemPropertyVariables> <CamelTestRouteCoverage>true</CamelTestRouteCoverage> </systemPropertyVariables> </configuration> </plugin>
或者在运行测试时从命令行:
mvn clean test -DCamelTestRouteCoverage=true