jacoco
java启动参数
1 | -javaagent:/Users/pro9q/software/jacoco-0.8.6/lib/jacocoagent.jar=includes=*,output=tcpserver,port=6300,address=localhost,append=true |
获取文件到本地
1 | java -jar jacoco-0.8.6/lib/jacococli.jar dump --address localhost --port 6300 --destfile jacoco-data/jacoco-demo.exec |
生成覆盖率文件
1 | java -jar jacoco-0.8.6/lib/jacococli.jar report jacoco-data/jacoco-demo.exec --classfiles /Users/pro9q/IdeaProjects/jvm-sandbox-mock/mock-web/target --sourcefiles /Users/pro9q/IdeaProjects/jvm-sandbox-mock/mock-web/src/main/java --html jacoco-data/report1 --xml jacoco-data/report.xml |