当前位置:网站首页>pytest接口自动化测试框架 | 集成Allure测试报告
pytest接口自动化测试框架 | 集成Allure测试报告
2022-08-01 07:12:00 【COCOgsta】
视频来源:B站《冒死上传!pytest接口自动化测试框架(基础理论到项目实战及二次开发)教学视频【软件测试】》
一边学习一边整理老师的课程内容及试验笔记,并与大家分享,侵权即删,谢谢支持!
附上汇总贴:pytest接口自动化测试框架 | 汇总_COCOgsta的博客-CSDN博客
- 安装jdk1.8才可以运行Allure
- 解压Allure压缩包
- 配置Allure到环境变量,到path里面
allure测试报告是基于pytest运行后,生成的json文件,来实现的结果展示,以一个工程的形态展示本次的所有测试结果
要集成pytest实现allure的展示,需要安装:
pip install allure-pytest
test_allure.py
import pytest
def test_case01():
assert 1==1
def test_case02():
assert 1 == 1
def test_case03():
assert 1 == 3
def test_case04():
assert 1 == 4
def test_case05():
assert 1 == 5
def test_case06():
assert 1 == 6main.py
import pytest
import os
if __name__ == '__main__':
pytest.main(['-s', 'test_allure.py', '--alluredir', './result'])
os.system('allure generate ./result/ -o ./report_allure/ --clean')边栏推荐
猜你喜欢
随机推荐
安装SQL Server详细教程
How to generate and configure public key certificate in Alipay
阿里云李飞飞:中国云数据库在很多主流技术创新上已经领先国外
05-SDRAM: Arbitration
crypto-js使用
Dart 异常详解
Motion analysis and parameter optimization of crank-slider mechanism
监听父元素宽高,自适应插件大小
mysql的行锁和间隙锁
Does flinkcdc have any solution for mysql's date field type conversion?
Using FiddlerScript caught poly FiddlerScript 】 【 download
return;代表含义
并发编程13-JUC之CountDownLatch
我说过无数遍了:从来没有一种技术是为灵活组合这个目标而设计的
响应式织梦模板园林花卉类网站
Introduction to the basic principles, implementation and problem solving of crawler
Dell PowerEdge Server R450 RAID Configuration Steps
POJ2421道路建设题解
Golang:go静态文件处理
app 自动化 打开app (二)









