Python+Jenkins+Allure Report接口自动化测试持续集成
·
🍅 点击文末小卡片,免费获取软件测试全套资料,资料在手,涨薪更快
项目介绍
-
接口功能测试应用:
http://www.weather.com.cn/data/cityinfo/<city_code>
.html -
测试功能:获取对应城市的天气预报
-
源码:Python
-
功能包:HttpClient
-
请求方法:Get
-
自动化测试框架:pytest
-
源码位置:
https://github.com/shifengboy/iInterface_python
源码讲解
-
HttpClient:网络http请求类
-
Weather:测试用例类
-
Readme.md: 说明
项目配置
1.新建一个自由风格的项目

2.添加项目描述和运行节点

3.添加git源

4.构建项目命令

构建命令
. ~/.bash_profile
# 进入到项目目录
cd iInterface_python
# 安装项目所需依赖
pip3 install -r requirements.txt
# 运行项目并生成allure报告
pytest -vs test/weather_test.py --alluredir=./allure-results --clean-alluredir
# 打开报告
allure generate ./allure-results -o ./allure-reports --clean
# 删除已存在的报告包
rm -rf allure-reports.zip
# 生成新报告包,用于发送邮件
zip -r allure-reports.zip allure-reports
allure的安装及使用参见:
https://www.cnblogs.com/feng0815/p/13792188.html
5.添加allure报告路径

6.添加邮件配置

保存,构建

生成的allure报告

最后: 下方这份完整的软件测试视频教程已经整理上传完成,需要的朋友们可以自行领取【保证100%免费】

软件测试面试文档
我们学习必然是为了找到高薪的工作,下面这些面试题是来自阿里、腾讯、字节等一线互联网大厂最新的面试资料,并且有字节大佬给出了权威的解答,刷完这一套面试资料相信大家都能找到满意的工作。



更多推荐
所有评论(0)