当前位置:网站首页>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')边栏推荐
- LeetCode 0150. Reverse Polish Expression Evaluation
- 【视觉SLAM十四讲】第一章理论详解
- Golang:go模版引擎的使用
- How to generate and configure public key certificate in Alipay
- The use of Golang: go template engine
- Leetcode第 304 场周赛
- Information system project managers must recite the work of the core test site (56) Configuration Control Board (CCB)
- Three aspects of Ali: How to solve the problem of MQ message loss, duplication and backlog?
- sum of special numbers
- JVM:运行时数据区-PC寄存器(程序计数器)
猜你喜欢
随机推荐
CSP-S2019兴奋不已
Bean的生命周期
More than 2022 cattle guest school game 4 yue
研发过程中的文档管理与工具
仿牛客网项目总结
响应式织梦模板园林景观类网站
三维坐标系距离
根据指定区域内容生成图片并进行分享总结
爬虫框架 Scrapy 详解
matlab wind speed model wavelet filtering
rhcsa 第四天
crypto-js uses
爬虫基本原理介绍、实现以及问题解决
POJ1251丛林之路题解
特别数的和
选择排序—直接选择排序和堆排序
小程序通过云函数操作数据库【使用get取数据库】
【南瓜书ML】(task4)神经网络中的数学推导(更新ing)
MATLAB程序设计与应用 2.5 MATLAB运算
JVM:运行时数据区-PC寄存器(程序计数器)









