Allure: Jenkins plugin and Maven reporting

I am using Jenkins with Allure Jenkins plugin and I am trying to generate Allure reports for my Maven project. Unfortunately I am getting the following error:

    Allure Report Generation: started
    Allure Report Generation: find directories by mask [**/allure-results]
    Allure Report Generation: found allure result directories [/home/chetan/.jenkins/jobs/mlmk/workspace/target/allure-results]
    Allure Report Generation: copy founded directories in directory [/home/chetan/.jenkins/jobs/mlmk/workspace/allure7650093845080999575.tmp/results]
    Allure Report Generation: generate report from directory [/home/chetan/.jenkins/jobs/mlmk/workspace/allure7650093845080999575.tmp]
    ERROR: Publisher ru.yandex.qatools.allure.jenkins.AllureReportPublisher 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:47)
        at ru.yandex.qatools.allure.jenkins.utils.ReportGenerator.invoke(ReportGenerator.java:18)
        at hudson.FilePath.act(FilePath.java:922)
        at hudson.FilePath.act(FilePath.java:895)
        at ru.yandex.qatools.allure.jenkins.AllureReportPublisher.generateReport(AllureReportPublisher.java:193)
        at ru.yandex.qatools.allure.jenkins.AllureReportPublisher.perform(AllureReportPublisher.java:135)
        at hudson.tasks.BuildStepMonitor$2.perform(BuildStepMonitor.java:32)
        at hudson.model.AbstractBuild$AbstractBuildExecution.perform(AbstractBuild.java:772)
        at hudson.model.AbstractBuild$AbstractBuildExecution.performAllBuildSteps(AbstractBuild.java:736)
        at hudson.model.Build$BuildExecution.post2(Build.java:183)
        at hudson.model.AbstractBuild$AbstractBuildExecution.post(AbstractBuild.java:685)
        at hudson.model.Run.execute(Run.java:1757)
        at hudson.model.FreeStyleBuild.run(FreeStyleBuild.java:43)
        at hudson.model.ResourceController.execute(ResourceController.java:88)
        at hudson.model.Executor.run(Executor.java:234)
    Caused by: ru.yandex.qatools.allure.report.AllureReportBuilderException: java.lang.reflect.InvocationTargetException
        at ru.yandex.qatools.allure.report.AllureReportBuilder.processResults(AllureReportBuilder.java:135)
        at ru.yandex.qatools.allure.jenkins.utils.ReportGenerator.invoke(ReportGenerator.java:44)
        ... 14 more
    Caused by: java.lang.reflect.InvocationTargetException
        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
        at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
        at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
        at java.lang.reflect.Method.invoke(Method.java:606)
        at ru.yandex.qatools.allure.report.AllureReportBuilder.processResults(AllureReportBuilder.java:133)
        ... 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
    Finished: FAILURE

      

Where is the problem? Can anyone provide an example pom for Allure reporting using TestNg?

+3


source to share


2 answers


Here's an example using Allure with TestNG: https://github.com/allure-examples/allure-testng-example . By the way, your problem may be due to the Jenkins plugin downloading all required dependencies from the internet. You are using a proxy, this may be the reason for its inoperability (here the problem: https://github.com/allure-framework/allure-report-builder/issues/3 ).



+1


source


Well, the error looks like a problem with XML processing at the time of the actual report generation. If you can show the generated report .xml files and post them here (at least a part), we can try to figure out what's wrong with them.



0


source







All Articles