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
    • 测试结果:正常
相关推荐
A_Tai23333337 小时前
PyTest
pytest
bjwuzh5 天前
使用pytest实现参数化后,控制台输出的日志是乱码
pytest
2025年一定要上岸6 天前
pytest框架 - 第二集 allure报告
pytest
头疼的程序员8 天前
allure生成测试报告(搭配Pytest、allure-pytest)
测试工具·pytest
文人sec8 天前
接口自动化测试设计思路--设计实战
python·https·单元测试·自动化·pytest
测试开发Kevin10 天前
从投入产出、效率、上手难易度等角度综合对比 pytest 和 unittest 框架
python·pytest
测试开发Kevin12 天前
以pytest_addoption 为例,讲解pytest框架中钩子函数的应用
python·pytest
川石教育18 天前
Pytest中的fixture装饰器详解
python自动化测试·pytest·pytest自动化测试框架·pytest测试框架·pytest单元测试框架
春风又。18 天前
接口自动化——参数化
python·测试工具·自动化·pytest
XTY0020 天前
mac电脑pytest生成测试报告
pytest