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')
相关推荐
春风又。3 天前
接口自动化——初识pytest
python·测试工具·自动化·pytest
南部余额3 天前
playwright解决重复登录问题,通过pytest夹具自动读取storage_state用户状态信息
前端·爬虫·python·ui·pytest·pylawright
小码哥说测试6 天前
接口自动化进阶 —— Pytest全局配置pytest.ini文件详解!
自动化测试·软件测试·测试工具·自动化·pytest·测试工程师
天才测试猿6 天前
Python常用自动化测试框架—Pytest
自动化测试·软件测试·python·功能测试·测试工具·测试用例·pytest
Rhys..6 天前
2、pytest核心功能(进阶用法)
开发语言·python·pytest
一只天蝎的晋升之路8 天前
Python中常用的测试框架-pytest和unittest
开发语言·python·pytest
明月与玄武8 天前
pytest-xdist 进行高效并行自动化测试
pytest·pytest-xdist·进行高效并行自动化测试
测试笔记(自看)8 天前
Python+Requests+Pytest+YAML+Allure接口自动化框架
python·自动化·pytest·allure
活跃家族9 天前
Jsonpath使用
python·pytest
Rhys..9 天前
4、pytest常用插件
pytest