当前位置:网站首页>接口差异测试——Diffy工具
接口差异测试——Diffy工具
2022-07-02 22:41:00 【敏敏1020】
一、Diffy工作原理
二、Diffy使用
克隆源码:
git clone https://github.com/twitter/diffy.git
构建diffy-server.jar,依次执行以下两条命令
cd diffy ./sbt assembly启动diffy服务
- http接口启动diffy命令
java -jar diffy-server.jar -candidate=localhost:8080 -master.primary=localhost:8081 -master.secondary=localhost:8082 -service.protocol=http -serviceName=My-Service -proxy.port=:8880 -admin.port=:8881 -http.port=:8888 -rootUrl='localhost:8888' - https接口启动diffy命令(亲测可用,搞了很久)
java -jar diffy-server.jar -candidate=www.baidu.test -master.primary=www.baidu.com -master.secondary=www.baidu.com -service.protocol=https -serviceName=My-Service -proxy.port=:9990 -admin.port=:9991 -http.port=:8888 -rootUrl='localhost:8888' -summary.email='[email protected]' -summary.delay="5" -allowHttpSideEffects=true -excludeHttpHeadersComparison='true' 参数说明
参数 说明 -candidate=www.baidu.test 待上线版本的ip或域名。
假如百度测试环境的host为www.baidu.test
-master.primary=www.baidu.com 已上线版本的ip1或域名1 -master.secondary=www.baidu.com 已上线版本的ip2或域名2 -service.protocol=https http协议或https协议 -serviceName=My-Service 服务名称。任意写 -proxy.port=:9990 代理端口。所有请求应从这个端口访问。如:curl localhost:9990/search/1 -admin.port=:9991 -http.port=:8888 diffy报告端口。localhost:8888 -rootUrl='localhost:8888' 同上 -summary.email='[email protected]' 报告邮件收件地址 -summary.delay="5" -allowHttpSideEffects=true diffy考虑到安全性,post、put、delete请求默认忽略。设置为true可使这些类型请求仍能正常代理发送 -excludeHttpHeadersComparison='true' 是否排除header的差异。一般设置为true。不同服务的header有所差别,可忽略 踩坑说明!!!
- responseMode=primary:有一些文章里写到参数包含responseMode,但是执行时会报错:。报错信息里提示并没有该参数,去掉这一项就不会报错。
- excludeHttpHeadersComparison=false:此参数执行时报错:。解决方法:给false加上双引号,即excludeHttpHeadersComparison="false"
- http接口启动diffy命令
diffy报告
- localhost:8888,浏览器访问该地址,即可查看diffy报告。
- 报告示例
边栏推荐
- What experience is there only one test in the company? Listen to what they say
- Go basic constant definition and use
- All things work together, and I will review oceanbase's practice in government and enterprise industry
- 【ML】李宏毅三:梯度下降&分类(高斯分布)
- The concepts of terminal voltage, phase voltage and line voltage in FOC vector control and BLDC control are still unclear
- Talk about memory model and memory order
- Convolution和Batch normalization的融合
- What is the official website address of e-mail? Explanation of the login entry of the official website address of enterprise e-mail
- Which common ports should the server open
- VIM interval deletion note
猜你喜欢

Request and response

CDN 加速,需要域名先备案
![Third party payment function test point [Hangzhou multi tester _ Wang Sir] [Hangzhou multi tester]](/img/d8/d22cbbaccb1594ee46aca098c41002.png)
Third party payment function test point [Hangzhou multi tester _ Wang Sir] [Hangzhou multi tester]

"A good programmer is worth five ordinary programmers!"

JSON数据传递参数

实用系列丨免费可商用视频素材库

How does win11 turn on visual control? Win11 method of turning on visual control

YOLOX加强特征提取网络Panet分析

Go basic data type

理想汽车×OceanBase:当造车新势力遇上数据库新势力
随机推荐
Flexible combination of applications is a false proposition that has existed for 40 years
Agnosticism and practice makes perfect
Writing of head and bottom components of non routing components
基于Pyqt5工具栏按钮可实现界面切换-2
Container runtime analysis
[Verilog tutorial]
@How to use bindsinstance in dagger2
Data set - fault diagnosis: various data and data description of bearings of Western Reserve University
一文掌握基于深度学习的人脸表情识别开发(基于PaddlePaddle)
Why does RTOS system use MPU?
Ideal car × Oceanbase: when the new forces of car building meet the new forces of database
C MVC creates a view to get rid of the influence of layout
Remote connection of raspberry pie by VNC viewer
附加:token;(没写完,别看…)
【Proteus仿真】51单片机+LCD12864推箱子游戏
Simple square wave generating circuit [51 single chip microcomputer and 8253a]
流媒体技术优化
The use of 8255 interface chip and ADC0809
C# MVC创建一个视图摆脱布局的影响
JDBC练习案例
https://blog.csdn.net/jinjiangongzuoshi/article/details/106799081/