当前位置:网站首页>接口自动化覆盖率统计——Jacoco使用
接口自动化覆盖率统计——Jacoco使用
2022-07-02 22:41:00 【敏敏1020】
一、下载Jacoco
二、Jacoco命令
启动服务,在项目目录下执行如下命令
java -javaagent:jacocoagent.jar=includes=*,output=tcpserver,port=9100,address=127.0.0.1-jar xxx/target/xxx.jar注意:这里我直接把
jacocoagent.jar包、jacococli.jar包放在了项目目录下,和src同级如果报错:找不到jar,可以尝试进入到target目录下,终端执行pwd,复制jar包的位置。启动服务后,跑自动化代码
通过jacococli.jar导出覆盖率记录的exec文件
java -jar jacococli.jar dump --address127.0.0.1--port9100--destfile ./jacoco.exec --reset通过jacococli.jar生成覆盖率报告
Java -jar jacococli.jar report ./jacoco.exec --classfiles target/classes --sourcefiles src/main/java --encoding utf-8--html jacoReport- 在浏览器打开项目jacoReport目录下的index.html文件,即可展示覆盖率报告
边栏推荐
- Agnosticism and practice makes perfect
- Mapper agent development
- Catalogue of digital image processing experiments
- Interface switching based on pyqt5 toolbar button -1
- Talk about memory model and memory order
- leetcode 650. 2 Keys Keyboard 只有两个键的键盘(中等)
- Markdown basic grammar
- Go project operation method
- C MVC creates a view to get rid of the influence of layout
- Speech recognition Series 1: speech recognition overview
猜你喜欢

LINQ usage collection in C #

How much do you know about synchronized?

Why can't the start method be called repeatedly? But the run method can?

JSON数据传递参数

JDBC練習案例

Request and response

面试过了,起薪16k

Where is the win11 automatic shutdown setting? Two methods of setting automatic shutdown in win11

Program analysis and Optimization - 9 appendix XLA buffer assignment

How to apply for company email when registering in company email format?
随机推荐
How to maintain the brand influence of clothing enterprises
返回二叉树中最大的二叉搜索子树的根节点
“一个优秀程序员可抵五个普通程序员!”
[OJ] intersection of two arrays (set, hash mapping...)
[live broadcast appointment] database obcp certification comprehensive upgrade open class
一文掌握基于深度学习的人脸表情识别开发(基于PaddlePaddle)
【ML】李宏毅三:梯度下降&分类(高斯分布)
Eight honors and eight disgraces of the programmer version~
JSON数据传递参数
2022 latest and complete interview questions for software testing
Boost库链接错误解决方案
Fudian bank completes the digital upgrade | oceanbase database helps to layout the distributed architecture of the middle office
(毒刺)利用Pystinger Socks4上线不出网主机
"A good programmer is worth five ordinary programmers!"
高数有多难?AI 卷到数学圈,高数考试正确率 81%!
SharedPreferences 保存List<Bean> 到本地并解决com.google.gson.internal.LinkedTreeMap cannot be cast to异常
采用VNC Viewer方式远程连接树莓派
Bean加载控制
请求与响应
解决:exceptiole ‘xxxxx.QRTZ_LOCKS‘ doesn‘t exist以及mysql的my.cnf文件追加lower_case_table_names后启动报错