当前位置:网站首页>接口自动化测试平台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来判断所要用哪个域名,
边栏推荐
- Twitter acquired a public opinion war, which was turned into a child quarrel by musk
- 软件测试进阶篇—测试分类
- The Yellow Crane Tower has a super shocking perspective. You've never seen such a VR panorama!
- Nc68 jumping steps
- Communication between processes (pipeline communication)
- Vc/pe is running towards Qingdao
- 动态内存管理
- [Huawei machine test real question] string matching
- pd.melt() vs reshape2::melt()
- Partial correlation calculation of R language and partial correlations calculation using pcor function of GGM package
猜你喜欢

2022年IAA行业品类发展洞察系列报告·第二期

Register carefully! The number of applicants for these double non-governmental institutions exceeded 10000!

With a financing of 200million yuan, the former online bookstore is now closed nationwide, with only 3 stores left in 60 stores

pd.melt() vs reshape2::melt()

可视化模型网络连接

软件测试进阶篇—测试分类

什么是3DE体验平台

Add a little surprise to life and be a prototype designer of creative life -- sharing with X contestants in the programming challenge

这届年轻人,为“丑东西”有多上头?
![[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)?
随机推荐
Add a little surprise to life and be a prototype designer of creative life -- sharing with X contestants in the programming challenge
TypeError: Unrecognized value type: <class ‘str‘> ParserError: Unknown string format
You can change this value on the server by setting the 'Max_ allowed_ Packet 'variable error
[web page performance optimization] what about the slow loading speed of the first screen of SPA (single page application)?
11.1-cm24 nearest common ancestor
单臂路由实验演示(Huawei路由器设备配置)
Uniapp scroll bar topping effect, customized page scroll bar position (sorting)
蓝牙协议详解(蓝牙是什么)
Interview shock: why does TCP need three handshakes?
If you want to do a good job in software testing, you can first understand ast, SCA and penetration testing
ServletConfig class and ServletContext class
The auction house is a VC, and the first time it makes a move, it throws a Web3
Optimistic lock resolution
Analysis of regression problem, modeling and prediction
浏览器内核有几种,浏览器版本过低怎么升级
阿里云技术专家邓青琳:云上跨可用区容灾和异地多活最佳实践
对迁移学习中域适应的理解和3种技术的介绍
There was an error while marking a file for deletion
曾拿2亿融资,昔日网红书店如今全国闭店,60家店仅剩3家
Register carefully! The number of applicants for these double non-governmental institutions exceeded 10000!