当前位置:网站首页>接口差异测试——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报告。
- 报告示例
边栏推荐
- Fudian bank completes the digital upgrade | oceanbase database helps to layout the distributed architecture of the middle office
- How can cross-border e-commerce achieve low-cost and steady growth by laying a good data base
- Go project operation method
- "A good programmer is worth five ordinary programmers!"
- Pandora IOT development board learning (HAL Library) - Experiment 3 key input experiment (learning notes)
- Leetcode DP three step problem
- 【OJ】两个数组的交集(set、哈希映射 ...)
- What is the official website address of e-mail? Explanation of the login entry of the official website address of enterprise e-mail
- Makefile configuration of Hisilicon calling interface
- cocospods 的使用
猜你喜欢

Hisilicon VI access video process

Go basic constant definition and use

非路由组件之头部组件和底部组件书写

Interface switching based on pyqt5 toolbar button -2

【直播预约】数据库OBCP认证全面升级公开课

RuntimeError: no valid convolution algorithms available in CuDNN

How much do you know about synchronized?

What experience is there only one test in the company? Listen to what they say

Eight honors and eight disgraces of the programmer version~

Writing of head and bottom components of non routing components
随机推荐
万物并作,吾以观复|OceanBase 政企行业实践
php 获取真实ip
简述中台的常识
SharedPreferences save list < bean > to local and solve com google. gson. internal. Linkedtreemap cannot be cast to exception
Connexion à distance de la tarte aux framboises en mode visionneur VNC
第三方支付功能测试点【杭州多测师_王sir】【杭州多测师】
All things work together, and I will review oceanbase's practice in government and enterprise industry
高数有多难?AI 卷到数学圈,高数考试正确率 81%!
How much do you know about synchronized?
JDBC练习案例
Pandora IOT development board learning (HAL Library) - Experiment 3 key input experiment (learning notes)
【Proteus仿真】51单片机+LCD12864推箱子游戏
Win11系统explorer频繁卡死无响应的三种解决方法
【OJ】两个数组的交集(set、哈希映射 ...)
Container runtime analysis
Solution: exceptiole 'xxxxx QRTZ_ Locks' doesn't exist and MySQL's my CNF file append lower_ case_ table_ Error message after names startup
JDBC教程
CADD课程学习(4)-- 获取没有晶体结构的蛋白(SWISS-Model)
CDN 加速,需要域名先备案
C# MVC创建一个视图摆脱布局的影响
https://blog.csdn.net/jinjiangongzuoshi/article/details/106799081/