Pytest 环境:
platform linux -- Python 3.6.8, pytest-3.3.2, py-1.5.2, pluggy-0.9.0
rootdir: /home/user/pytest, inifile:
plugins: metadata-1.8.0, html-1.20.0, allure-adaptor-1.7.10
Jenkins 环境:
Jenkins ver. 2.164.2
Allure Jenkins plugin: 2.28.1
项目配置:
构建:
执行 shell:
python3 -m pytest -q test_sample.py --alluredir ${WORKSPACE}/allure-results
构建后操作:
Allure Report:
Results path: ${WORKSPACE}/allure-results
其它配置保持默认。
问题:
在项目中点击 Allure Report,提示:HTTP ERROR 404
执行构建后失败:
[pytest] $ /bin/sh -xe /tmp/jenkins5150009942176255687.sh
+ python3 -m pytest -q test_sample.py --alluredir /home/user/pytest/allure-results
... [100%]
3 passed in 0.07 seconds
[pytest] $ /var/lib/jenkins/tools/ru.yandex.qatools.allure.jenkins.tools.AllureCommandlineInstallation/Allure/bin/allure generate -c -o /home/user/pytest/allure-report
Could not generate report: {}
......
ERROR: Build step failed with exception
ru.yandex.qatools.allure.jenkins.exception.AllurePluginException: Can not generate Allure Report, exit code: 1
at ru.yandex.qatools.allure.jenkins.AllureReportPublisher.generateReport(AllureReportPublisher.java:314)
......
Build step 'Allure Report' marked build as failure
由于构建失败而跳过归档
Finished: FAILURE