You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Hi,
when generating report with allure based on output files from allure-phpunit adapter, allure fails with some XSLT errors. I suspect the allure-phpunit as a cause, because when using files generated from junit example project, the report generating works.
run ./vendor/bin/phpunit in allure-phpunit-example to generate output
run allure /tmp/allure-phpunit-example/allure-report-data/
generating fails:
/tmp/allure-phpunit-example $ allure /tmp/allure-phpunit-example/allure-report-data/
Error on line 215
XTDE0410: An attribute node (version) cannot be created after the children of the containing element
at xsl:call-template name="copy-all-without-namespace" (#211)
at xsl:apply-templates (#27)
processing /alr:allure-test-run/test-suites[1]/test-suite[1]/@version
at xsl:apply-templates (#216)
processing /alr:allure-test-run/test-suites[1]/test-suite[1]
at xsl:call-template name="copy-all-without-namespace" (#211)
at xsl:apply-templates (#14)
processing /alr:allure-test-run/test-suites[1]
in built-in template rule
Exception in thread "main" java.lang.RuntimeException: ru.yandex.qatools.allure.report.AllureReportBuilderException: java.lang.reflect.InvocationTargetException
at ru.yandex.qatools.allure.AllureCli.generate(AllureCli.java:119)
at ru.yandex.qatools.allure.AllureCli.run(AllureCli.java:82)
at ru.yandex.qatools.allure.AllureCli.main(AllureCli.java:73)
Caused by: ru.yandex.qatools.allure.report.AllureReportBuilderException: java.lang.reflect.InvocationTargetException
at ru.yandex.qatools.allure.report.AllureReportBuilder.processResults(AllureReportBuilder.java:113)
at ru.yandex.qatools.allure.AllureCli.generate(AllureCli.java:104)
... 2 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:111)
... 3 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.TestRunGenerator.generate(TestRunGenerator.java:64)
at ru.yandex.qatools.allure.data.AllureReportGenerator.generate(AllureReportGenerator.java:45)
... 8 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)
... 13 more
I discovered that the version attribute in the XML generated by allure-phpunit adapted is causing the problem:
This is because PHPUnit was from the beginning implemented for Allure 1.4.0. Allure CLI for compatibility reasons is by default using version 1.3.9 of the report. So to make it work you need to explicitly specify any 1.4.x version of Allure (in fact chances are very high that 1.4.0.RC9 is the final 1.4.0 release), e.g.:
Thanks for help, it is working like this. I actually tried using -v 1.4.0 before reporting the issue, but it was not working (for obvious reasons), so I was a bit confused.
Hi,
when generating report with allure based on output files from allure-phpunit adapter, allure fails with some XSLT errors. I suspect the allure-phpunit as a cause, because when using files generated from junit example project, the report generating works.
Steps to reproduce:
./vendor/bin/phpunit
in allure-phpunit-example to generate outputallure /tmp/allure-phpunit-example/allure-report-data/
I discovered that the version attribute in the XML generated by allure-phpunit adapted is causing the problem:
If i remove the version attribute, the report generating works fine.
The text was updated successfully, but these errors were encountered: