pytest生成报告no tests ran in 0.01s

除了基本的环境配置、用例名要以test_开头,有个地方是我自己忽略了,在执行时没有指定用例文件,所以没有找到。

复制代码
if __name__ == '__main__':
    pytest.main(["testcases/test_demo.py","-svq", __file__, '--alluredir=./allure-results'])
    os.system('allure generate ./allure-results -o ./allure-report --clean')
相关推荐
云半S一16 小时前
pytest的学习过程
经验分享·笔记·学习·pytest
0和1的舞者20 小时前
GUI自动化测试详解(三):测试框架pytest完全指南
自动化测试·python·测试开发·自动化·pytest·测试
我的xiaodoujiao1 天前
使用 Python 语言 从 0 到 1 搭建完整 Web UI自动化测试学习系列 39--生成 Allure测试报告
python·学习·测试工具·pytest
我的xiaodoujiao1 天前
使用 Python 语言 从 0 到 1 搭建完整 Web UI自动化测试学习系列 38--Allure 测试报告
python·学习·测试工具·pytest
旦莫3 天前
Pytest教程:Pytest与主流测试框架对比
人工智能·python·pytest
X1A0RAN3 天前
解决docker容器执行pytest命令报socket.gaierror: [Errno -2] Name or service not known 错误问题
docker·容器·pytest
程序员三藏4 天前
接口自动化测试之 pytest 接口关联框架封装
自动化测试·软件测试·python·测试工具·测试用例·pytest·接口测试
旦莫5 天前
怎么才能算对自动化测试框架二次开发(以Pytest为例)
python·测试开发·pytest·ai测试
彩色面团儿7 天前
Pytest框架测试用例分析(测试笔记二)
笔记·测试用例·pytest
阿蔹7 天前
Python-Pytest-Requests-API接口测试自动化框架2
python·自动化·pytest