当前位置:网站首页>接口自动化覆盖率统计——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 --address
127.0
.
0.1
--port
9100
--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文件,即可展示覆盖率报告
边栏推荐
- Maybe you read a fake Tianlong eight
- RuntimeError: no valid convolution algorithms available in CuDNN
- Fusion de la conversion et de la normalisation des lots
- [array] binary search
- 2022 latest and complete interview questions for software testing
- 【直播预约】数据库OBCP认证全面升级公开课
- Convolution和Batch normalization的融合
- leetcode 650. 2 Keys Keyboard 只有两个键的键盘(中等)
- 一文掌握基于深度学习的人脸表情识别开发(基于PaddlePaddle)
- LINQ usage collection in C #
猜你喜欢
Highly available cluster (HAC)
Data set - fault diagnosis: various data and data description of bearings of Western Reserve University
Use redis to realize self increment serial number
Talk about memory model and memory order
Why can't the start method be called repeatedly? But the run method can?
容器运行时分析
CDN 加速,需要域名先备案
Catalogue of digital image processing experiments
跨境电商如何通过打好数据底座,实现低成本稳步增长
YOLOX加强特征提取网络Panet分析
随机推荐
ArrayList分析2 :Itr、ListIterator以及SubList中的坑
Detailed explanation of 'viewpager' in compose | developer said · dtalk
(毒刺)利用Pystinger Socks4上线不出网主机
How difficult is it to be high? AI rolls into the mathematics circle, and the accuracy rate of advanced mathematics examination is 81%!
Where is the win11 microphone test? Win11 method of testing microphone
Container runtime analysis
第三方支付功能测试点【杭州多测师_王sir】【杭州多测师】
How can cross-border e-commerce achieve low-cost and steady growth by laying a good data base
Makefile configuration of Hisilicon calling interface
Bean加载控制
Sourcetree details
提交代码流程
All things work together, and I will review oceanbase's practice in government and enterprise industry
How to set automatic reply for mailbox and enterprise mailbox?
Use redis to realize self increment serial number
解决:exceptiole ‘xxxxx.QRTZ_LOCKS‘ doesn‘t exist以及mysql的my.cnf文件追加lower_case_table_names后启动报错
Compose 中的 'ViewPager' 详解 | 开发者说·DTalk
Go basic data type
Win11麦克风测试在哪里?Win11测试麦克风的方法
C# MVC创建一个视图摆脱布局的影响