Allure--一款测试报告框架。
doc:https://docs.qameta.io/allure
安装路径:https://github.com/allure-framework/allure2/releases
Windows下载zip包->解压(pytest的安装路径)->进入bin目录->运行allure.bat->将allure的bin目录加到PATH环境变量中去(加成功后cmd命令框输入allure --vresion即可查看安装的allure版本)
linux命令安装allure-pytest:
pip install allure-pytest
新建一个python文件,定义几个测试方法:
import pytest
def test_success():
"""this test succeeds"""
assert True
def test_failure():
"""this test fails"""
assert False
def test_skip():
"""this test is skipped"""
pytest.skip('for a reason!')
def test_broken():
raise Exception(