Jenkins无法为生成的魅力报告xml文件标识正确的目录 [英] Jenkins not able to identify the correct directory for the generated allure report xml file

查看:571
本文介绍了Jenkins无法为生成的魅力报告xml文件标识正确的目录的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我已成功将Allure报告集成到基于Maven的testNG项目中,并能够使用码头服务器查看该报告. 但是,现在我要按照此处建议的说明,将诱惑力报告与詹金斯结合起来- http://wiki.qatools.ru/display/AL/Allure+Jenkins+Plugin 现在,我可以在詹金斯页面上看到诱惑"图标,但是如果单击此图标,则会看到404-找不到页面"错误.

I have integrated successfully Allure report to my maven based testNG project and able to see that report using the jetty server. But now I am trying to integrate the allure report with jenkins by following the instructions as suggested here- http://wiki.qatools.ru/display/AL/Allure+Jenkins+Plugin I am now able to see the allure icon on my jenkins page but if I click on this icon I see a 404-'page not found' error.

我进一步调试控制台输出并看到发生异常-

I further debug the console output and see an exception occuring-

Exception in thread "main" ru.yandex.qatools.allure.data.ReportGenerationException: Could not find any allure results
at ru.yandex.qatools.allure.data.AllureReportGenerator.generate(AllureReportGenerator.java:58)
at ru.yandex.qatools.allure.data.AllureReportGenerator.generate(AllureReportGenerator.java:53)
at ru.yandex.qatools.allure.AllureMain.main(AllureMain.java:48)
Command aborted due to exception {}.
org.apache.commons.exec.ExecuteException: Process exited with an error: 1 (Exit value: 1)
at org.apache.commons.exec.DefaultExecutor.executeInternal(DefaultExecutor.java:404)
at org.apache.commons.exec.DefaultExecutor.execute(DefaultExecutor.java:166)
at org.apache.commons.exec.DefaultExecutor.execute(DefaultExecutor.java:153)
at ru.yandex.qatools.allure.command.ReportGenerate.runUnsafe(ReportGenerate.java:48)
at ru.yandex.qatools.allure.command.AbstractCommand.run(AbstractCommand.java:52)
at ru.yandex.qatools.allure.CommandLine.main(CommandLine.java:46)

我猜这个错误即将到来,因为詹金斯无法识别诱惑报告xml的正确目录,并且要更正我们必须修改pom.xml以便它可以告诉詹金斯正确目录的路径是什么.

I guess this error is coming because jenkins not able to identify the correct directory of the allure report xml, and to correct that we have to modify the pom.xml so that it can tell jenkins what is the path of correct directory.

有人请提出我在这里想念的东西.

Someone please suggest what am I missing here.

推荐答案

最后,我得到了答案.问题是我的詹金斯配置不在吸引力报告中.我以不正确的方式导入了项目,因此我的詹金斯试图在詹金的工作区目录中找到该报告,但是没有任何内容.

Finally I got the answer. The problem was my jenkins configuration not in allure report. I was importing my project in a incorrect way so my jenkins was trying to find the report in jenkin's workspace directory but there was nothing.

所以我做了什么,我将maven项目作为一个自由样式项目重新导入到jenkins,并将自定义工作区设置为我的实际项目目录.现在一切正常.

So what I did, I re-import my maven project to jenkins as a free-style project and set the custom workspace to my actual project directory. Now everything works fine.

这篇关于Jenkins无法为生成的魅力报告xml文件标识正确的目录的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆