【问题标题】:Allure: Jenkins Plugin is not able to generate report引诱:詹金斯插件无法生成报告
【发布时间】:2017-07-02 09:07:26
【问题描述】:

你能帮忙吗?

运行量角器测试。

Jenkins 插件无法生成报告。

错误:404 未找到。

Allure 插件:2.19

Allure 命令行:1.54

量角器:5.1.2

Jenkins 在本地运行:2.60.1

NodeJS:6.9.4

NPM:4.0.5

错误堆栈跟踪:报告的 allure-report 已在使用中,添加“--clean”选项以覆盖。

堆栈跟踪:

[11:56:19] I/launcher - 0 instance(s) of WebDriver still running
[11:56:19] I/launcher - chrome #01 failed 1 test(s)
[11:56:19] I/launcher - overall: 1 failed spec(s)
[11:56:19] E/launcher - Process exited with error code 1
npm ERR! Test failed.  See above for more details.
Build step 'Execute Windows batch command' marked build as failure
[protractor-allure-reporting-example] $ D:\Jenkins\tools\ru.yandex.qatools.allure.jenkins.tools.AllureCommandlineInstallation\allure-commandline\allure-2.2.1\bin\allure.bat generate 
D:\Jenkins\workspace\protractor-allure-reporting-example\first-result -o 
D:\Jenkins\workspace\protractor-allure-reporting-example\allure-report
Allure: Target directory D:\Jenkins\workspace\protractor-allure-reporting-
example\allure-report for the report is already in use, add a '--clean' option to overwrite
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:173)
at ru.yandex.qatools.allure.jenkins.AllureReportPublisher.perform(AllureReportPublisher.java:94)
at hudson.tasks.BuildStepCompatibilityLayer.perform(BuildStepCompatibilityLayer.java:81)
at hudson.tasks.BuildStepMonitor$1.perform(BuildStepMonitor.java:20)
at hudson.model.AbstractBuild$AbstractBuildExecution.perform(AbstractBuild.java:735)
at hudson.model.AbstractBuild$AbstractBuildExecution.performAllBuildSteps(AbstractBuild.java:676)
at hudson.model.Build$BuildExecution.post2(Build.java:186)
at hudson.model.AbstractBuild$AbstractBuildExecution.post(AbstractBuild.java:621)
at hudson.model.Run.execute(Run.java:1760)
at hudson.model.FreeStyleBuild.run(FreeStyleBuild.java:43)
at hudson.model.ResourceController.execute(ResourceController.java:97)
at hudson.model.Executor.run(Executor.java:405)
Build step 'Allure Report' marked build as failure
Finished: FAILURE

【问题讨论】:

    标签: jenkins jasmine protractor allure


    【解决方案1】:

    似乎您需要在构建之前清理工作区。或者您可以在报告生成之前再添加一个步骤,这将删除 allure-report 目录。

    【讨论】:

    • 我在生成报告之前又添加了一步,但仍然显示相同
    【解决方案2】:

    将其添加到 package.json 脚本中

    "posttest": "allure generate allure-results --clean -o allure-report || true && allure report open -o allure-report"
    

    【讨论】:

      【解决方案3】:

      尝试检查生成魅力报告的 docker 容器是否无法检测到 java_home。所以尝试设置你的容器结束的报告路径,然后你的魅力报告将能够找到 java_home。

      并且能够生成报告。

      使用以下命令进行检查:

      sh "/var/lib/.../ru.yandex.qatools.allure.jenkins.tools.AllureCommandlineInstallation/../bin/allure --version"
      

      【讨论】:

        猜你喜欢
        • 2022-08-18
        • 2021-09-10
        • 1970-01-01
        • 1970-01-01
        • 1970-01-01
        • 1970-01-01
        • 1970-01-01
        • 1970-01-01
        • 1970-01-01
        相关资源
        最近更新 更多