Pytest+Jenkins:ERROR: Build step failed with exception 解决办法 您所在的位置:网站首页 installationstepfailed Pytest+Jenkins:ERROR: Build step failed with exception 解决办法

Pytest+Jenkins:ERROR: Build step failed with exception 解决办法

#Pytest+Jenkins:ERROR: Build step failed with exception 解决办法| 来源: 网络整理| 查看: 265

将 pytest 脚本调试通过后,部署到 Windows 本地的 Jenkins 上,代码脚本执行没有问题,但是构建完成后没有生成 Allure 测试报告,报错内容如下图所示:

E:\project_pytest>exit 0 [project_pytest] $ C:\Windows\system32\config\systemprofile\AppData\Local\Jenkins\.jenkins\tools\ru.yandex.qatools.allure.jenkins.tools.AllureCommandlineInstallation\allure-2.15.0\bin\allure.bat generate E:\project_pytest\report_allure -c -o E:\project_pytest\allure-report 输入行太长。 命令语法不正确。 ERROR: Build step failed with exception ru.yandex.qatools.allure.jenkins.exception.AllurePluginException: Can not generate Allure Report, exit code: 255 at ru.yandex.qatools.allure.jenkins.AllureReportPublisher.generateReport(AllureReportPublisher.java:314) at ru.yandex.qatools.allure.jenkins.AllureReportPublisher.perform(AllureReportPublisher.java:231) at jenkins.tasks.SimpleBuildStep.perform(SimpleBuildStep.java:123) at hudson.tasks.BuildStepCompatibilityLayer.perform(BuildStepCompatibilityLayer.java:81) at hudson.tasks.BuildStepMonitor$1.perform(BuildStepMonitor.java:21) at hudson.model.AbstractBuild$AbstractBuildExecution.perform(AbstractBuild.java:808) at hudson.model.AbstractBuild$AbstractBuildExecution.performAllBuildSteps(AbstractBuild.java:757) at hudson.model.Build$BuildExecution.post2(Build.java:179) at hudson.model.AbstractBuild$AbstractBuildExecution.post(AbstractBuild.java:701) at hudson.model.Run.execute(Run.java:1936) at hudson.model.FreeStyleBuild.run(FreeStyleBuild.java:43) at hudson.model.ResourceController.execute(ResourceController.java:100) at hudson.model.Executor.run(Executor.java:433) Build step 'Allure Report' marked build as failure Finished: FAILURE 解决方案以及操作步骤:

1. 回到 Jenkins 的 Dashboard 首页 2. Manage Jenkins > System Configuration > Global Tool Configuration 在这里插入图片描述

3. 滚动条下拉,找到 Allure Commandline ,点击 Allure Commandline 安装 在这里插入图片描述

4. 将本地 Allure 目录添加至 系统下 Allure Commandline 安装列表中 5. 应用并保存配置信息,重新构建 Job 任务,【构建成功】

E:\project_pytest>exit 0 [Pytest_Allure] $ D:\PYTEST\allure-2.15.0\bin\allure.bat generate -c -o C:\Windows\system32\config\systemprofile\AppData\Local\Jenkins\.jenkins\workspace\Pytest_Allure\allure-report allure-results does not exist Report successfully generated to C:\Windows\system32\config\systemprofile\AppData\Local\Jenkins\.jenkins\workspace\Pytest_Allure\allure-report Allure report was successfully generated. Creating artifact for the build. Artifact was added to the build. Finished: SUCCESS

在这里插入图片描述



【本文地址】

公司简介

联系我们

今日新闻

    推荐新闻

    专题文章
      CopyRight 2018-2019 实验室设备网 版权所有