我正在尝试将CureOS7上的Jenkins与allure report插件一起用于使用TestNg和Allure测试适配器的Java maven项目。测试运行良好,并且按预期生成了诱人的结果。我在Jenkins文件中的构建步骤是
post {
always {
script {
allure([
commandline: 'allure',
includeProperties: false,
jdk: '',
properties: [],
reportBuildPolicy: 'ALWAYS',
results: [[path: target/allure-results]]
])
}
}
}
我可以在构建之前看到一个小诱惑图标,当我单击它时,我会被路由到http://xxx.xx.x.xx/index.html#404,其中包含以下信息:
URI: /index.html
STATUS: 404
MESSAGE: Not Found
SERVLET: Stapler
在Jenkins构建日志中,我看到以下内容:
$ /bin/allure generate "/home/path/to/job/target/allure-results" -c -o "/home/path/to/job/allure-report"
WARN: No current version specified. Use `allure switch <version>` to select version of the report.
Allure report was successfully generated.
Creating artifact for the build.
Artifact was added to the build.
Finished: SUCCESS
当我尝试使用allure serve
手动生成吸引力报告时,可以在浏览器中查看HTML报告。但Jenkins工作返回了404。