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)
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.
You need to fetch your Allure results path from your Maven project to Jenkins from
project.name\target\allure-results
and add it in Jenkins\Your Job\Configure\Allure Report\Result.After that you will need to change Jenkins security setting in one of 2 ways.
By starting Jenkins from:
By running this two scripts in http://Jenkins/script
edit: I just found 3rd way to do this. In your Jenkins folder open jenkins.XML and add
to arguments.
Edit:
pom.XML you asked for:
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.
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.