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
    • 测试结果:正常
相关推荐
胜天半月子20 小时前
Python自动化测试 | 快速认识并了解pytest的基本使用
服务器·python·pytest
北珣.5 天前
自动化框架pytest基础
自动化·pytest
程序员杰哥6 天前
Pytest之收集用例规则与运行指定用例
自动化测试·软件测试·python·测试工具·职场和发展·测试用例·pytest
学习3人组6 天前
Python + requests + pytest + allure + Jenkins 构建完整的接口自动化测试框架
python·jenkins·pytest
shao9185169 天前
Gradio全解14——使用Gradio构建MCP的服务器与客户端(4)——Python包命令:uv与uvx实战
pytest·uv·1024程序员节·npx·uvx·uv pip·ruff
我的xiaodoujiao10 天前
使用 Python 语言 从 0 到 1 搭建完整 Web UI自动化测试学习系列 20--PO(POM) 设计模式和用例撰写
python·学习·测试工具·设计模式·pytest
sky0Lan11 天前
一个类似 pytest 的 html 报告
android·html·pytest
一半烟火以谋生12 天前
Python + Pytest + Allure 自动化测试报告教程
开发语言·python·pytest
一半烟火以谋生13 天前
pytest conftest.py 使用教程
pytest
我的xiaodoujiao13 天前
使用 Python 语言 从 0 到 1 搭建完整 Web UI自动化测试学习系列 19--测试框架Pytest基础 3--前后置操作应用
python·学习·测试工具·pytest