栏目分类:
子分类:
返回
名师互学网用户登录
快速导航关闭
当前搜索
当前分类
子分类
实用工具
热门搜索
名师互学网 > IT > 软件开发 > 后端开发 > Python

jenkins生成allure测试报告避坑指南

Python 更新时间: 发布时间: IT归档 最新发布 模块sitemap 名妆网 法律咨询 聚返吧 英语巴士网 伯小乐 网商动力

jenkins生成allure测试报告避坑指南

被坑图镇帖

遇到的一部分报错

C:ProgramDataJenkins.jenkinsworkspaceallureReport>exit 1 
Build step 'Execute Windows batch command' marked build as failure
ERROR: Build step failed with exception
ru.yandex.qatools.allure.jenkins.exception.AllurePluginException: Can not find any allure commandline installation.
	at ru.yandex.qatools.allure.jenkins.AllureReportPublisher.getCommandline(AllureReportPublisher.java:349)
	at ru.yandex.qatools.allure.jenkins.AllureReportPublisher.generateReport(AllureReportPublisher.java:303)
	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:79)
	at hudson.tasks.BuildStepMonitor$1.perform(BuildStepMonitor.java:20)
	at hudson.model.AbstractBuild$AbstractBuildExecution.perform(AbstractBuild.java:816)
	at hudson.model.AbstractBuild$AbstractBuildExecution.performAllBuildSteps(AbstractBuild.java:765)
	at hudson.model.Build$BuildExecution.post2(Build.java:179)
	at hudson.model.AbstractBuild$AbstractBuildExecution.post(AbstractBuild.java:709)
	at hudson.model.Run.execute(Run.java:1922)
	at hudson.model.FreeStyleBuild.run(FreeStyleBuild.java:44)
	at hudson.model.ResourceController.execute(ResourceController.java:101)
	at hudson.model.Executor.run(Executor.java:442)
Build step 'Allure Report' marked build as failure
Finished: FAILURE
C:ProgramDataJenkins.jenkinsworkspaceallureReport>exit 1 
Build step 'Execute Windows batch command' marked build as failure
ERROR: Step ‘Allure Report’ aborted due to exception: 
java.io.IOException: Can't find allure commandline 
	at ru.yandex.qatools.allure.jenkins.tools.AllureCommandlineInstallation$GetMajorVersion.call(AllureCommandlineInstallation.java:74)
	at ru.yandex.qatools.allure.jenkins.tools.AllureCommandlineInstallation$GetMajorVersion.call(AllureCommandlineInstallation.java:65)
	at hudson.remoting.LocalChannel.call(LocalChannel.java:47)
	at ru.yandex.qatools.allure.jenkins.tools.AllureCommandlineInstallation.getMajorVersion(AllureCommandlineInstallation.java:63)
	at ru.yandex.qatools.allure.jenkins.ReportBuilder.build(ReportBuilder.java:52)
	at ru.yandex.qatools.allure.jenkins.AllureReportPublisher.generateReport(AllureReportPublisher.java:312)
	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:79)
	at hudson.tasks.BuildStepMonitor$1.perform(BuildStepMonitor.java:20)
	at hudson.model.AbstractBuild$AbstractBuildExecution.perform(AbstractBuild.java:816)
	at hudson.model.AbstractBuild$AbstractBuildExecution.performAllBuildSteps(AbstractBuild.java:765)
	at hudson.model.Build$BuildExecution.post2(Build.java:179)
	at hudson.model.AbstractBuild$AbstractBuildExecution.post(AbstractBuild.java:709)
	at hudson.model.Run.execute(Run.java:1922)
	at hudson.model.FreeStyleBuild.run(FreeStyleBuild.java:44)
	at hudson.model.ResourceController.execute(ResourceController.java:101)
	at hudson.model.Executor.run(Executor.java:442)
Finished: FAILURE
C:ProgramDataJenkins.jenkinsworkspaceallureReport>exit 0 
[allureReport] $ C:ProgramDataJenkins.jenkinstoolsru.yandex.qatools.allure.jenkins.tools.AllureCommandlineInstallationallurebinallure.bat generate C:ProgramDataJenkins.jenkinsworkspaceallureReportallureReport -c -o C:ProgramDataJenkins.jenkinsworkspaceallureReportallureReportreport
输入行太长。
命令语法不正确。
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:79)
	at hudson.tasks.BuildStepMonitor$1.perform(BuildStepMonitor.java:20)
	at hudson.model.AbstractBuild$AbstractBuildExecution.perform(AbstractBuild.java:816)
	at hudson.model.AbstractBuild$AbstractBuildExecution.performAllBuildSteps(AbstractBuild.java:765)
	at hudson.model.Build$BuildExecution.post2(Build.java:179)
	at hudson.model.AbstractBuild$AbstractBuildExecution.post(AbstractBuild.java:709)
	at hudson.model.Run.execute(Run.java:1922)
	at hudson.model.FreeStyleBuild.run(FreeStyleBuild.java:44)
	at hudson.model.ResourceController.execute(ResourceController.java:101)
	at hudson.model.Executor.run(Executor.java:442)
Build step 'Allure Report' marked build as failure
Finished: FAILURE

首先你肯定会根据网上的教程操作,第一步就把allure通过jenkins下载,哈哈。

然后会发现 安装目录Jenkins.jenkinstools中会多出
ru.yandex.qatools.allure.jenkins.tools.AllureCommandlineInstallationAllure,嗯,这里面就是刚才通过jenkins下载的allure。虽然安装成功了,但是这个东西他妈的用不了,太坑了。这个坑涉及到几个错误。

你要做的是手动下载一个allure压缩包,然后解压到ru.yandex.qatools.allure.jenkins.tools.AllureCommandlineInstallationAllure下面。


好了。一个坑已经过了。下一个。



python和java的环境变量要填好

可以生成报告了

转载请注明:文章转载自 www.mshxw.com
本文地址:https://www.mshxw.com/it/876201.html
我们一直用心在做
关于我们 文章归档 网站地图 联系我们

版权所有 (c)2021-2022 MSHXW.COM

ICP备案号:晋ICP备2021003244-6号