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报告

最后感谢每一个认真阅读我文章的人,礼尚往来总是要有的,虽然不是什么很值钱的东西,如果你用得到的话可以直接拿走:

这些资料,对于做【软件测试】的朋友来说应该是最全面最完整的备战仓库,这个仓库也陪伴我走过了最艰难的路程,希望也能帮助到你!凡事要趁早,特别是技术行业,一定要提升技术功底。

更多推荐




所有评论(0)