技术栈

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套接字通信
相关推荐
惜.己
1 小时前
pytest中使用ordering控制函数的执行顺序
开发语言·python·pytest
惜.己
1 天前
pytest中使用skip跳过某个函数
开发语言·python·测试工具·pytest
程序员小远
2 天前
Pytest+Selenium UI自动化测试实战实例
自动化测试·软件测试·python·selenium·测试工具·ui·pytest
惜.己
4 天前
pytest简单使用和生成测试报告
开发语言·python·pytest
better-tomorrow
4 天前
pytest-log
pytest
别在内卷了
7 天前
测试学习之——Pytest Day4
python·学习·pytest
别在内卷了
8 天前
测试学习之——Pytest Day3
python·学习·pytest
土小帽软件测试
8 天前
mac系统安装、启动Jenkins,创建pytest接口自动化任务
macos·jenkins·pytest
Chasing__Dreams
9 天前
pytest--1--pytest-mock常用的方法
pytest
chao_789
9 天前
更灵活方便的初始化、清除方法——fixture【pytest】
服务器·自动化测试·python·pytest
热门推荐
01Qwen3-Coder 快速上手教程 | Qwen Code + Claude Code02扣子开源本地部署教程 丨Coze智能体小白喂饭级指南03全球最强模型Grok4,国内已可免费使用!(附教程)04vue数据变化但页面不变05Coze 开源了,送上保姆级私有化部署方案【建议收藏】06KGG转MP3工具|非KGM文件|解密音频0701-开源版COZE-字节 Coze Studio 重磅开源!保姆级本地安装教程,手把手带你体验08干翻 Typora!MilkUp:完全免费的桌面端 Markdown 编辑器!09sqli-labs 靶场 less-8、9、10 第八关到第十关详解:布尔注入,时间注入10【2025.7.18】更新vscode后所有.vue文件template标签后报红的临时解决办法,Vue - Official 插件3.0.2导致