当前位置:网站首页>接口自动化测试平台FasterRunner系列(四)- 持续集成、解决多域名
接口自动化测试平台FasterRunner系列(四)- 持续集成、解决多域名
2022-07-25 18:44:00 【wangmcn】
接口自动化测试平台FasterRunner系列(四)
持续集成、解决多域名
目录
- 1、持续集成
- 1.1、Jenkins
- 1.2、脚本代码
- 1.3、发送报告
- 2、解决多域名
1、持续集成
由于目前FasterRunner暂时还没有以插件的方式与Jenkins集成,采取执行的思路是使用FasterRunner的执行测试用例集接口方式来与Jenkins进行持续集成。
1.1、Jenkins
创建了2个项目,执行脚本方式分为:定时执行与手动执行
定时执行用例(全部)
手动执行用例(单个)
定时执行配置
手动执行配置
1.2、脚本代码
configure.conf配置文件,主要设置报告开关、特殊消息、失败用例个数等。
data.yaml配置文件,用于存放钉钉许可token、测试用例集ID
程序执行入口代码(部分):
执行用例集
从数据库中获取报告(部分)
发送报告到钉钉
钉钉报告内容(部分)
1.3、发送报告
测试用例集执行完成后,将报告发送到钉钉群里。
1、测试结果:成功
2、测试结果:失败,标记失败用例个数,并截取失败接口信息。
2、解决多域名
在接口自动化测试过程中,所抓取到的接口,往往不是单个域名,而是按照不同服务,而存在的多域名(如接口1所用域名为AAA,接口2所用域名为BBB),再加上不同环境(测试环境、生产环境等),这个时候单纯利用配置是不能满足多域名多环境的指定切换。
解决思路:
1、在驱动代码里写函数,将多个域名地址填写进去。
如图所示:参数pod来指定所使用的域名,参数environment来指定切换的环境。
2、接口引用驱动代码里的函数即可。
如图所示:引用函数{getURL(environment,app)} ,其中app来判断所要用哪个域名,
边栏推荐
- 优秀的测试/开发程序员突破,不忘初心,方得始终......
- 进程通信(SystemV通信方式:共享内存,消息队列,信号量)
- Typescript reflection object reflection use
- Circulaindicator component, which makes the indicator style more diversified
- 软件测试进阶篇—测试分类
- 8 年产品经验,我总结了这些持续高效研发实践经验 · 研发篇
- 论文修改回复1
- The Yellow Crane Tower has a super shocking perspective. You've never seen such a VR panorama!
- Optimistic lock resolution
- 进程间的通信(管道通信)
猜你喜欢

Interview shock: why does TCP need three handshakes?

n-queens problem

Pixel2Mesh从单个RGB图像生成三维网格ECCV2018
![[Huawei machine test real question] string matching](/img/0f/972cde8c749e7b53159c9d9975c9f5.png)
[Huawei machine test real question] string matching
![[web page performance optimization] what about the slow loading speed of the first screen of SPA (single page application)?](/img/e2/9b62dd9bd0f2bc8dcbb6d9c851254d.png)
[web page performance optimization] what about the slow loading speed of the first screen of SPA (single page application)?

【帮助中心】为您的客户提供自助服务的核心选项

对迁移学习中域适应的理解和3种技术的介绍

浏览器内核有几种,浏览器版本过低怎么升级

曾拿2亿融资,昔日网红书店如今全国闭店,60家店仅剩3家

市值300亿,欧洲十年来最大IPO再冲纽交所
随机推荐
What is 3DE experience platform
【华为机试真题】字符串匹配
Share six practical applet plug-ins
11.2-hj86 find the maximum number of continuous bits
Dachang cloud business adjustment, a new round of war turn
If you want to do a good job in software testing, you can first understand ast, SCA and penetration testing
Care for front-line epidemic prevention workers, Haocheng JIAYE and Gaomidian sub district office jointly build the great wall of public welfare
Safe operation instructions for oscilloscope probe that must be read by engineers
淦,为什么 ““ .length !== 3 ??
年轻时代,噢,年轻时代
"Wdsr-3" Penglai pharmaceutical Bureau solution
Typescript reflection object reflection use
Application of current probe in ECU and electrical system current measurement
You can change this value on the server by setting the 'Max_ allowed_ Packet 'variable error
Disk performance and capacity
动态内存管理
[QNX hypervisor 2.2 user manual]9.5 dump
Partial correlation calculation of R language and partial correlations calculation using pcor function of GGM package
VC/PE正跑向青岛
Flexible current probe selection guide