allure生成测试报告,index.html页面内容为空

该条仅供参考,只是其中一种情况

之前使用的各种版本:

python:3.7.3

allure:2.13.10

pytest:6.2.4

allure-pytest:2.9.42

 

pytest.main(["-s", ‘test_three.py‘, ‘--alluredir‘, ‘../allure-result/html/‘])
>allure generate allure-result/html/ -o report-html/ --clean

正常生成测试报告,打开index.html页面为空白

 

重新下载allure版本:

python:3.7.3

allure:2.9.0

pytest:6.2.4

allure-pytest:2.9.42

打开后页面有数据(从结果看是版本兼容的问题)

该篇文章评论里有一条说到这个,可参考,统一allure和allure-pytest的版本号

https://ask.csdn.net/questions/7440063?ops_request_misc=%257B%2522request%255Fid%2522%253A%2522162433274316780255220726%2522%252C%2522scm%2522%253A%252220140713.130102334.pc%255Fall.%2522%257D&request_id=162433274316780255220726&biz_id=4&utm_medium=distribute.pc_search_result.none-task-ask_topic-2~all~first_rank_v2~rank_v29-3-7440063.first_rank_v2_pc_rank_v29&utm_term=python+allure%E7%94%9F%E6%88%90index.html%E9%A1%B5%E9%9D%A2%E7%A9%BA%E7%99%BD&spm=1018.2226.3001.4187

应该是版本问题,我感觉应该是官网下载的allure版本高于解释器里面allure-pytest的版本,版本不符合导致的JS报错。你们可以试试统一下版本号

allure生成测试报告,index.html页面内容为空

上一篇:Sortable.js在vue中实现拖拽


下一篇:Apache Tomcat 安装与配置教程