Настройка вывода репорта Allure в Jenkins CI

Добрый день, знатоки!
Подскажите, как правильно настроить репорт allure в jenkins.
Мной было сделано:
Скачан в дженкинсе allure plugin
Добавлен шаг Allure report generation к джобе, с стандартными настройками.
В логах вот что:

    Results :

Tests run: 46, Failures: 0, Errors: 0, Skipped: 0

[INFO] 
[INFO] --- maven-site-plugin:3.3:site (default-site) @ erbc-auto-testing ---
[INFO] configuring report plugin ru.yandex.qatools.allure:allure-maven-plugin:2.0
[INFO] Parent project loaded from repository: ru.yandex.qatools.allure:allure-examples-parent:pom:1.0
[INFO] Parent project loaded from repository: org.sonatype.oss:oss-parent:pom:7
[WARNING] Unable to find a URL to the parent project. The parent menu will NOT be added.
[INFO] Relativizing decoration links with respect to project URL: http://nexus.sonatype.org/oss-repository-hosting.html/allure-examples-parent/erbc-auto-testing
[INFO] Rendering site with org.apache.maven.skins:maven-default-skin:jar:1.0 skin.
[INFO] Generating "Allure" report    --- allure-maven-plugin:2.0
[INFO] Report Version: 1.4.16
[INFO] Results Pattern: **/allure-results
[INFO] Found [1] results directories by pattern [**/allure-results]
[INFO] Generate report to C:\Program Files (x86)\Jenkins\workspace\ERBC_UI_TEST\target\site\allure-maven-plugin
SLF4J: Failed to load class "org.slf4j.impl.StaticLoggerBinder".
SLF4J: Defaulting to no-operation (NOP) logger implementation
SLF4J: See http://www.slf4j.org/codes.html#StaticLoggerBinder for further details.
[INFO] Report data generated successfully. Unpack report face...
[INFO] Report unpacked successfully.
[INFO] ------------------------------------------------------------------------
[INFO] BUILD SUCCESS
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 01:54 h
[INFO] Finished at: 2015-08-21T12:29:45+03:00
[INFO] Final Memory: 47M/313M
[INFO] ------------------------------------------------------------------------
Allure Report Generation: started
Allure Report Generation: find directories by mask [**/allure-results]
Allure Report Generation: found allure result directories [C:\Program Files (x86)\Jenkins\workspace\ERBC_UI_TEST\target\allure-results]
Allure Report Generation: copy founded directories in directory [C:\Program Files (x86)\Jenkins\workspace\ERBC_UI_TEST\allure6897291402558296708.tmp\results]
Allure Report Generation: generate report from directory [C:\Program Files (x86)\Jenkins\workspace\ERBC_UI_TEST\allure6897291402558296708.tmp]
Allure Report Generation: proxy settings [active:'false', host:'null', port:'0', username:'null', password: '']
FATAL: PermGen space
Started calculate disk usage of build
Finished Calculation of disk usage of build in 0 seconds
Started calculate disk usage of workspace
Finished Calculation of disk usage of workspace in  2 minutes 11 seconds
Finished: SUCCESS

Но в итоге в интерфейсе джобы нет пункта Allure Report
В //target/ отчет появляется(как всегда)

Ну правильно

FATAL: PermGen space

Я уже сталкивался с такой проблемой. У меня она проявлялась, что странно на Java 8. Мне пришлось CI перевести на java 7, и увеличить Perm Gen.

1 лайк

Сейчас попробую. А где Perm Gen увеличить?

https://wiki.jenkins-ci.org/display/JENKINS/Builds+failing+with+OutOfMemoryErrors

The second is related to PermGen: java.lang.OutOfMemoryError: PermGen space. When you see this, you need to increase the maximum Permanent Generation space, which is used for things like class files and interned strings. You can do this by adding the following to your JVM arguments -XX:MaxPermSize=128m where you replace the number 128 with the new PermGen size in megabytes.

Нужно менять компич =))

В свойствах вашего CI. А вот где уж именно - зависит от того какой у вас сервер и как вы его запускаете. :grinning:

С памятью вроде разобрались, сейчас падает такой лог:

    Results :

Tests run: 46, Failures: 0, Errors: 0, Skipped: 0

[INFO] 
[INFO] --- maven-site-plugin:3.3:site (default-site) @ erbc-auto-testing ---
[INFO] configuring report plugin ru.yandex.qatools.allure:allure-maven-plugin:2.0
[INFO] Parent project loaded from repository: ru.yandex.qatools.allure:allure-examples-parent:pom:1.0
[INFO] Parent project loaded from repository: org.sonatype.oss:oss-parent:pom:7
[WARNING] Unable to find a URL to the parent project. The parent menu will NOT be added.
[INFO] Relativizing decoration links with respect to project URL: http://nexus.sonatype.org/oss-repository-hosting.html/allure-examples-parent/erbc-auto-testing
[INFO] Rendering site with org.apache.maven.skins:maven-default-skin:jar:1.0 skin.
[INFO] Generating "Allure" report    --- allure-maven-plugin:2.0
[INFO] Report Version: 1.4.16
[INFO] Results Pattern: **/allure-results
[INFO] Found [1] results directories by pattern [**/allure-results]
[INFO] Generate report to C:\Program Files (x86)\Jenkins\workspace\ERBC_UI_TEST\target\site\allure-maven-plugin
SLF4J: Failed to load class "org.slf4j.impl.StaticLoggerBinder".
SLF4J: Defaulting to no-operation (NOP) logger implementation
SLF4J: See http://www.slf4j.org/codes.html#StaticLoggerBinder for further details.
[INFO] Report data generated successfully. Unpack report face...
[INFO] Report unpacked successfully.
[INFO] ------------------------------------------------------------------------
[INFO] BUILD SUCCESS
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 01:59 h
[INFO] Finished at: 2015-09-02T12:56:04+03:00
[INFO] Final Memory: 35M/184M
[INFO] ------------------------------------------------------------------------
Allure Report Generation: started
Allure Report Generation: find directories by mask [**/allure-results]
Allure Report Generation: found allure result directories [C:\Program Files (x86)\Jenkins\workspace\ERBC_UI_TEST\target\allure-results]
Allure Report Generation: copy founded directories in directory [C:\Program Files (x86)\Jenkins\workspace\ERBC_UI_TEST\allure2820719023717196808.tmp\results]
Allure Report Generation: generate report from directory [C:\Program Files (x86)\Jenkins\workspace\ERBC_UI_TEST\allure2820719023717196808.tmp]
Allure Report Generation: proxy settings [active:'false', host:'null', port:'0', username:'null', password: '']
ERROR: Publisher 'Allure Report Generation' aborted due to exception: 
java.io.IOException: ru.yandex.qatools.allure.report.AllureReportBuilderException: java.lang.reflect.InvocationTargetException
	at ru.yandex.qatools.allure.jenkins.utils.ReportGenerator.invoke(ReportGenerator.java:50)
	at ru.yandex.qatools.allure.jenkins.utils.ReportGenerator.invoke(ReportGenerator.java:25)
	at hudson.FilePath.act(FilePath.java:991)
	at hudson.FilePath.act(FilePath.java:969)
	at ru.yandex.qatools.allure.jenkins.AllureReportPublisher.generateReport(AllureReportPublisher.java:267)
	at ru.yandex.qatools.allure.jenkins.AllureReportPublisher.perform(AllureReportPublisher.java:146)
	at hudson.tasks.BuildStepMonitor$1.perform(BuildStepMonitor.java:20)
	at hudson.model.AbstractBuild$AbstractBuildExecution.perform(AbstractBuild.java:779)
	at hudson.model.AbstractBuild$AbstractBuildExecution.performAllBuildSteps(AbstractBuild.java:726)
	at hudson.model.Build$BuildExecution.post2(Build.java:185)
	at hudson.model.AbstractBuild$AbstractBuildExecution.post(AbstractBuild.java:671)
	at hudson.model.Run.execute(Run.java:1769)
	at hudson.model.FreeStyleBuild.run(FreeStyleBuild.java:43)
	at hudson.model.ResourceController.execute(ResourceController.java:98)
	at hudson.model.Executor.run(Executor.java:374)
Caused by: ru.yandex.qatools.allure.report.AllureReportBuilderException: java.lang.reflect.InvocationTargetException
	at ru.yandex.qatools.allure.report.AllureReportBuilder.processResults(AllureReportBuilder.java:133)
	at ru.yandex.qatools.allure.jenkins.utils.ReportGenerator.invoke(ReportGenerator.java:47)
	... 14 more
Caused by: java.lang.reflect.InvocationTargetException
	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
	at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
	at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
	at java.lang.reflect.Method.invoke(Unknown Source)
	at ru.yandex.qatools.allure.report.AllureReportBuilder.processResults(AllureReportBuilder.java:131)
	... 15 more
Caused by: ru.yandex.qatools.allure.data.ReportGenerationException: net.sf.saxon.event.NoOpenStartTagException: An attribute node (version) cannot be created after the children of the containing element
	at ru.yandex.qatools.allure.data.utils.XslTransformationUtils.applyTransformation(XslTransformationUtils.java:55)
	at ru.yandex.qatools.allure.data.utils.XslTransformationUtils.applyTransformation(XslTransformationUtils.java:44)
	at ru.yandex.qatools.allure.data.utils.XslTransformationUtils.applyTransformation(XslTransformationUtils.java:35)
	at ru.yandex.qatools.allure.data.utils.XslTransformationUtils.applyTransformations(XslTransformationUtils.java:29)
	at ru.yandex.qatools.allure.data.TestSuiteFiles.generateTestRun(TestSuiteFiles.java:50)
	at ru.yandex.qatools.allure.data.AllureReportGenerator.generate(AllureReportGenerator.java:39)
	... 20 more
Caused by: net.sf.saxon.event.NoOpenStartTagException: An attribute node (version) cannot be created after the children of the containing element
	at net.sf.saxon.event.NoOpenStartTagException.makeNoOpenStartTagException(NoOpenStartTagException.java:49)
	at net.sf.saxon.event.ComplexContentOutputter.attribute(ComplexContentOutputter.java:296)
	at net.sf.saxon.instruct.CopyOf.copyAttribute(CopyOf.java:572)
	at net.sf.saxon.instruct.Copy.processLeavingTail(Copy.java:221)
	at net.sf.saxon.instruct.Template.expand(Template.java:220)
	at net.sf.saxon.instruct.CallTemplate$CallTemplatePackage.processLeavingTail(CallTemplate.java:440)
	at net.sf.saxon.instruct.ApplyTemplates.applyTemplates(ApplyTemplates.java:317)
	at net.sf.saxon.instruct.ApplyTemplates.apply(ApplyTemplates.java:210)
	at net.sf.saxon.instruct.ApplyTemplates.processLeavingTail(ApplyTemplates.java:174)
	at net.sf.saxon.instruct.Block.processLeavingTail(Block.java:556)
	at net.sf.saxon.instruct.Instruction.process(Instruction.java:93)
	at net.sf.saxon.instruct.ElementCreator.processLeavingTail(ElementCreator.java:296)
	at net.sf.saxon.instruct.Template.applyLeavingTail(Template.java:203)
	at net.sf.saxon.instruct.ApplyTemplates.applyTemplates(ApplyTemplates.java:345)
	at net.sf.saxon.instruct.ApplyTemplates.apply(ApplyTemplates.java:210)
	at net.sf.saxon.instruct.ApplyTemplates.process(ApplyTemplates.java:170)
	at net.sf.saxon.instruct.ElementCreator.processLeavingTail(ElementCreator.java:296)
	at net.sf.saxon.instruct.Copy.processLeavingTail(Copy.java:217)
	at net.sf.saxon.instruct.Template.expand(Template.java:220)
	at net.sf.saxon.instruct.CallTemplate$CallTemplatePackage.processLeavingTail(CallTemplate.java:440)
	at net.sf.saxon.instruct.ApplyTemplates.applyTemplates(ApplyTemplates.java:317)
	at net.sf.saxon.instruct.ApplyTemplates.apply(ApplyTemplates.java:210)
	at net.sf.saxon.instruct.ApplyTemplates.processLeavingTail(ApplyTemplates.java:174)
	at net.sf.saxon.instruct.Block.processLeavingTail(Block.java:556)
	at net.sf.saxon.instruct.Instruction.process(Instruction.java:93)
	at net.sf.saxon.instruct.ElementCreator.processLeavingTail(ElementCreator.java:296)
	at net.sf.saxon.instruct.Template.applyLeavingTail(Template.java:203)
	at net.sf.saxon.instruct.ApplyTemplates.applyTemplates(ApplyTemplates.java:345)
	at net.sf.saxon.instruct.ApplyTemplates.defaultAction(ApplyTemplates.java:378)
	at net.sf.saxon.instruct.ApplyTemplates.applyTemplates(ApplyTemplates.java:333)
	at net.sf.saxon.Controller.transformDocument(Controller.java:1807)
	at net.sf.saxon.Controller.transform(Controller.java:1621)
	at ru.yandex.qatools.allure.data.utils.XslTransformationUtils.applyTransformation(XslTransformationUtils.java:52)
	... 25 more
TestNG Reports Processing: START
Looking for TestNG results report in workspace using pattern: **/testng-results.xml
Saving reports...
Processing 'C:\Program Files (x86)\Jenkins\jobs\ERBC_UI_TEST\builds\145\testng\testng-results.xml'
TestNG Reports Processing: FINISH
Started calculate disk usage of build
Finished Calculation of disk usage of build in 0 seconds
Started calculate disk usage of workspace
Finished Calculation of disk usage of workspace in 0 seconds
Finished: FAILURE