allure测试报告用例数和 pytest执行用例数不相同问题

  1. 我出现的奇怪问题

    1. pytest执行了9条用例,但是测试报告确只显示3条用例
    2. 我将其中的一个代码删除后,发现allure测试报告又正常了
    3. 我觉得很奇怪这个代码只是删除了二维数组的第一列,我检查了半天都找不到问题,只有降低版本了。
  2. 导致原因:allure-pytest版本使用的是最新版本,pytest也使用的是最新版本。

    • 说明:在使用最新版本的时候容易出现各种各样奇怪问题。
  3. 解决办法:降低到上一个版本看是否还出现问题。

    • 注意:降低allure-pytest版本,但是也需要同时降低依赖allure-pytest插件的版本。
    • 我使用的版本:allure-pytest 2.13.5 pytest 8.2.1 allure 2.29.0
    • 我将全部都降低一个小版本后正常了
    • 降低为: allure-pytest: 2.12.0 pytest 7.4.4 allure 2.28.0
    • 测试结果:正常
相关推荐
旦莫16 小时前
怎么才能算对自动化测试框架二次开发(以Pytest为例)
python·测试开发·pytest·ai测试
彩色面团儿2 天前
Pytest框架测试用例分析(测试笔记二)
笔记·测试用例·pytest
阿蔹3 天前
Python-Pytest-Requests-API接口测试自动化框架2
python·自动化·pytest
彩色面团儿4 天前
Pycharm部署pytest运行测试(测试笔记一)
python·pycharm·集成测试·pytest
阿蔹4 天前
Python-Pytest
python·自动化·pytest
阿蔹5 天前
Python-Pytest-Requests-API接口测试自动化框架
python·自动化·pytest
先做个垃圾出来………5 天前
pytest + pytest-mock + pytest-parametrize为基础构建测试框架
microsoft·pytest
唐古乌梁海9 天前
【pytest】pytest详解-入门到精通
开发语言·python·pytest