技术栈

pytest生成报告no tests ran in 0.01s

知识倒进我脑里2025-02-12 13:02

除了基本的环境配置、用例名要以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')
上一篇:操作系统|ARM和X86的区别,存储,指令集
下一篇:day5QT套接字通信
相关推荐
我一定会有钱
5 小时前
pytest基础
python·测试工具·测试用例·pytest
西游音月
5 小时前
(6)pytest+Selenium自动化测试-测试用例编写
selenium·测试用例·pytest
兴趣使然黄小黄
2 天前
【Pytest】Pytest框架快速入门
python·pytest
m0_63248250
3 天前
Jenkins + Pytest +allure接口自动化测试配置与操作
jenkins·集成测试·pytest·jenkins配置
李星星BruceL
3 天前
Pytest第三章(参考指南1)
python·自动化·pytest
哎呀呦呵
3 天前
pytest基本使用
python·pytest
Kristen_YXQDN
3 天前
PyCharm 中 pytest 运行 python 测试文件报错:D:\Python_file\.venv\Scripts\python.exe: No module named pytest
运维·开发语言·python·pycharm·pytest
Low--Key
3 天前
pytest框架快速入门
python·自动化·pytest
姜西西_
3 天前
自动化测试框架pytest之fixture
android·java·pytest
测试开发Kevin
3 天前
超级实用!汇总pytest中那些常用的参数
单元测试·pytest
热门推荐
01GitHub 镜像站点02UV安装并设置国内源03Linux下V2Ray安装配置指南04在VSCode配置Java开发环境的保姆级教程(适配各类AI编程IDE)05安娜的档案(Anna’s Archive) 镜像网站/国内最新可访问入口(持续更新)06BongoCat - 跨平台键盘猫动画工具07【AutoGLM部署】本地私有化部署AI手机Agent08Open-AutoGLM Windows 安装部署教程09Labelme从安装到标注:零基础完整指南10Neo4j(一) - Neo4j安装教程(Windows)