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')
相关推荐
川石教育5 天前
Pytest中的fixture装饰器详解
python自动化测试·pytest·pytest自动化测试框架·pytest测试框架·pytest单元测试框架
春风又。5 天前
接口自动化——参数化
python·测试工具·自动化·pytest
XTY008 天前
mac电脑pytest生成测试报告
pytest
程序员的世界你不懂8 天前
pytest-前后置及fixture运用
pytest
天才测试猿9 天前
基于Pytest接口自动化的requests模块项目实战以及接口关联方法详解
自动化测试·软件测试·python·测试工具·单元测试·测试用例·pytest
HtwHUAT10 天前
五、UI自动化测试05--PyTest框架
经验分享·python·ui·pytest
程序员的世界你不懂10 天前
Pytest-mark使用详解(跳过、标记、参数 化)
pytest
fish_study_csdn12 天前
pytest 技术总结
开发语言·python·pytest
难以怀瑾13 天前
pytest心得体会
pytest
慌糖15 天前
[特殊字符]️ 基于Pytest的自动化测试框架架构解析
pytest