zoukankan      html  css  js  c++  java
  • 关于mac系统 jenkins生成allure报告“ru.yandex.qatools.allure.jenkins.exception.AllurePluginException: Can not generate Allure Report”的解决办法


    jenkins构建后报错记录:
    cases/test_login.py::TestLogin::test_login_success[xxxxx-xxxxx-u3010u9000u51fau3011]
    cases/test_login.py::TestLogin::test_login_success[xxxxx-xxxxx-【退出】] PASSED [100%]

    • generated html file: file:///Users/linguowei/PycharmProjects/rugao2020/report/report.html -
      ========================== 1 passed in 16.52 seconds ===========================
      [rugao2020] $ /Users/linguowei/.jenkins/tools/ru.yandex.qatools.allure.jenkins.tools.AllureCommandlineInstallation/allure/bin/allure generate /Users/linguowei/PycharmProjects/rugao2020/result -c -o /Users/linguowei/PycharmProjects/rugao2020/allure-report
      env: sh: No such file or directory
      ERROR: Build step failed with exception
      ru.yandex.qatools.allure.jenkins.exception.AllurePluginException: Can not generate Allure Report, exit code: 127
      at ru.yandex.qatools.allure.jenkins.AllureReportPublisher.generateReport(AllureReportPublisher.java:314)
      at ru.yandex.qatools.allure.jenkins.AllureReportPublisher.perform(AllureReportPublisher.java:231)
      at hudson.tasks.BuildStepCompatibilityLayer.perform(BuildStepCompatibilityLayer.java:79)
      at hudson.tasks.BuildStepMonitor$1.perform(BuildStepMonitor.java:20)
      at hudson.model.AbstractBuild$AbstractBuildExecution.perform(AbstractBuild.java:741)
      at hudson.model.AbstractBuild$AbstractBuildExecution.performAllBuildSteps(AbstractBuild.java:690)
      at hudson.model.Build$BuildExecution.post2(Build.java:186)
      at hudson.model.AbstractBuild$AbstractBuildExecution.post(AbstractBuild.java:635)
      at hudson.model.Run.execute(Run.java:1843)
      at hudson.model.FreeStyleBuild.run(FreeStyleBuild.java:43)
      at hudson.model.ResourceController.execute(ResourceController.java:97)
      at hudson.model.Executor.run(Executor.java:429)
      Build step 'Allure Report' marked build as failure
      Finished: FAILURE

    解决办法:
    在jenkins目录下allure插件下面的 bin/allure文件,将第一行环境变量 :#!/usr/bin/env sh 设置为Jenkins的环境变量:#!/bin/sh -ilex 保存后重新构建即可解决。
    本机bin/allure文件路径:/Users/linguowei/.jenkins/tools/ru.yandex.qatools.allure.jenkins.tools.AllureCommandlineInstallation/allure/bin/allure

  • 相关阅读:
    NodeJs搭建简单的Http和Https服务器
    VSCode C++开发环境配置
    OpenCV查找并发现轮廓
    OpenCV使用连通组件检测并输出图像中的对象
    OpenCV使用阈值截断实现二值分割(黑白图)
    使用OpenCV实现背景减除
    get current UTC datetime of Python
    setTimeout and setInterval counterpart of Python
    setup airflow on MySQL
    HeidiSQL
  • 原文地址:https://www.cnblogs.com/linguowei/p/12958143.html
Copyright © 2011-2022 走看看