当前位置:网站首页>接口差异测试——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报告。
- 报告示例
边栏推荐
- [Verilog tutorial]
- 2022 latest and complete interview questions for software testing
- How to apply for company email when registering in company email format?
- leetcode 650. 2 keys keyboard with only two keys (medium)
- 95页智慧教育解决方案2022
- Why can't the start method be called repeatedly? But the run method can?
- Convolution和Batch normalization的融合
- 基于FPGA的VGA协议实现
- 顶级 DevOps 工具链大盘点
- VIM interval deletion note
猜你喜欢
Convolution和Batch normalization的融合
请求与响应
Interface switching based on pyqt5 toolbar button -2
RuntimeError: no valid convolution algorithms available in CuDNN
C# MVC创建一个视图摆脱布局的影响
JSON数据传递参数
What can I do after buying a domain name?
Why can't the start method be called repeatedly? But the run method can?
Intranet penetration | teach you how to conduct intranet penetration hand in hand
CADD课程学习(4)-- 获取没有晶体结构的蛋白(SWISS-Model)
随机推荐
67页新型智慧城市整体规划建设方案(附下载)
2022 latest and complete interview questions for software testing
跨境电商如何通过打好数据底座,实现低成本稳步增长
CADD course learning (4) -- obtaining proteins without crystal structure (Swiss model)
Boost库链接错误解决方案
万物并作,吾以观复|OceanBase 政企行业实践
RuntimeError: no valid convolution algorithms available in CuDNN
Leetcode relaxation question - day of the week
How to apply for company email when registering in company email format?
公司里只有一个测试是什么体验?听听他们怎么说吧
JDBC練習案例
Which common ports should the server open
ArrayList分析2 :Itr、ListIterator以及SubList中的坑
请求与响应
35页危化品安全管理平台解决方案2022版
Solution to boost library link error
@BindsInstance在Dagger2中怎么使用
返回二叉树中最大的二叉搜索子树的根节点
Go project operation method
Dishes launcher small green program and directory management (efficiency tool)