当前位置:网站首页>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')边栏推荐
- POJ2421道路建设题解
- VSCode插件推荐(Rust环境)
- The BP neural network based on MATLAB voice characteristic signal classification
- sum of special numbers
- 湖仓一体电商项目(一):项目背景和架构介绍
- Windows taskbar icon abnormal solution
- 2022杭电多校第二场1011 DOS Card(线段树)
- Using FiddlerScript caught poly FiddlerScript 】 【 download
- Json对象和Json字符串的区别
- 从底层结构开始学习FPGA(6)----分布式RAM(DRAM,Distributed RAM)
猜你喜欢

阿里云李飞飞:中国云数据库在很多主流技术创新上已经领先国外

matlab wind speed model wavelet filtering

【视觉SLAM十四讲】第一章理论详解

响应式织梦模板园林景观类网站

小程序通过云函数操作数据库【使用get取数据库】

Upgrade to heavyweight lock, lock reentrancy will lead to lock release?

MVVM project development (commodity management system 1)
![Explosive 30,000 words, the hardest core丨Mysql knowledge system, complete collection of commands [recommended collection]](/img/7f/08b323ffc5b5f8e3354bee6775b994.png)
Explosive 30,000 words, the hardest core丨Mysql knowledge system, complete collection of commands [recommended collection]

Using FiddlerScript caught poly FiddlerScript 】 【 download

金山打字通 官网 下载
随机推荐
JSON 与 JS 对象的区别
return;代表含义
插入排序—直接插入排序和希尔排序
MATLAB程序设计与应用 2.5 MATLAB运算
weight distribution
表的创建、修改与删除
The BP neural network based on MATLAB voice characteristic signal classification
Self-made a remote control software - VeryControl
LeetCode240+312+394
滚动条样式修改
研发过程中的文档管理与工具
LevelSequence源码分析
Electromagnetic compatibility introductory tutorial (6) test project
VSCode插件推荐(Rust环境)
Win任务栏图标异常解决
Srping bean in the life cycle
【南瓜书ML】(task4)神经网络中的数学推导(更新ing)
Windows taskbar icon abnormal solution
Why is the lightweight VsCode used more and more?Why eat my C drive 10G?How to Painlessly Clean VsCode Cache?Teach you how to lose weight for C drive
从购买服务器到网站搭建成功保姆级教程~超详细