History | Log In     View a printable version of the current page.  
Issue Details (XML | Word | Printable)

Key: QB-1365
Type: Bug Bug
Status: Resolved Resolved
Resolution: Fixed
Priority: Critical Critical
Assignee: Unassigned
Reporter: AlSt
Votes: 0
Watchers: 0
Operations

If you were logged in you would be able to see more operations.
QuickBuild

Invalid XML character in nunit report can lead to "green" builds although tests are broken

Created: 04/Sep/12 01:10 PM   Updated: 05/Sep/12 12:07 PM
Component/s: None
Affects Version/s: 4.0.53
Fix Version/s: 4.0.58

Original Estimate: Unknown Remaining Estimate: Unknown Time Spent: Unknown


 Description  « Hide
One of our nunit tests contained a invalid xml character, which broke the processing of xml report files:

Message in QB:
--------------------------------------------------------------
    UnProcessed Reports

    Export XML

    The following XML reports were not processed because they are mal-formed. Please refer to the build log for details.

    » Show all file contents
    testResults.xml
--------------------------------------------------------------

from the build log:
--------------------------------------------------------------
00:04:22,124 [master>publish>publish-nunit-test-results>publish-report-tests-nunit@B-W3-64-DN30:8811] WARN - Processing resource d:\trunk\nunit\non-prod\test\unit\dotnet\reports\testResults.xml failed.
java.lang.RuntimeException: org.dom4j.DocumentException: Error on line 398 of document : Character reference "&#x0" is an invalid XML character. Nested exception: Character reference "&#x0" is an invalid XML character.
at com.pmease.quickbuild.bootstrap.BootstrapUtils.wrapAsUnchecked(BootstrapUtils.java:50)
at com.pmease.quickbuild.util.ExceptionUtils.wrapAsUnchecked(ExceptionUtils.java:83)
at com.pmease.quickbuild.plugin.report.engine.util.XMLHelper.readXML(XMLHelper.java:221)
at com.pmease.quickbuild.plugin.report.engine.util.XMLHelper.readXML(XMLHelper.java:238)
at com.pmease.quickbuild.plugin.report.engine.generator.reader.XMLResourceReader.read(XMLResourceReader.java:37)
at com.pmease.quickbuild.plugin.report.engine.generator.reader.XMLResourceReader.read(XMLResourceReader.java:1)
at com.pmease.quickbuild.plugin.report.engine.generator.xpath.XPathProcessor.processResource(XPathProcessor.java:64)
at com.pmease.quickbuild.plugin.report.engine.generator.AbstractProcessor.doExecute(AbstractProcessor.java:77)
at com.pmease.quickbuild.plugin.report.engine.generator.GenerateAction.execute(GenerateAction.java:37)
at com.pmease.quickbuild.plugin.report.engine.generator.AbstractGenerator.doExecute(AbstractGenerator.java:38)
at com.pmease.quickbuild.plugin.report.engine.generator.GenerateAction.execute(GenerateAction.java:37)
at com.pmease.quickbuild.plugin.report.engine.generator.DefaultGenerator.generate(DefaultGenerator.java:36)
at com.pmease.quickbuild.plugin.report.engine.contribution.publisher.AbstractPublisher.run(AbstractPublisher.java:139)
at com.pmease.quickbuild.plugin.report.nunit.NUnitPublisher$$EnhancerByCGLIB$$ed337ed2.CGLIB$run$23(<generated>)
at com.pmease.quickbuild.plugin.report.nunit.NUnitPublisher$$EnhancerByCGLIB$$ed337ed2$$FastClassByCGLIB$$31725485.invoke(<generated>)
at net.sf.cglib.proxy.MethodProxy.invokeSuper(MethodProxy.java:215)
at com.pmease.quickbuild.DefaultScriptEngine$Interpolator.intercept(DefaultScriptEngine.java:273)
at com.pmease.quickbuild.plugin.report.nunit.NUnitPublisher$$EnhancerByCGLIB$$ed337ed2.run(<generated>)
at com.pmease.quickbuild.stepsupport.Step.execute(Step.java:455)
at com.pmease.quickbuild.stepsupport.StepJob.execute(StepJob.java:42)
at com.pmease.quickbuild.grid.GridJob.run(GridJob.java:122)
at java.lang.Thread.run(Thread.java:662)
Caused by: org.dom4j.DocumentException: Error on line 398 of document : Character reference "&#x0" is an invalid XML character. Nested exception: Character reference "&#x0" is an invalid XML character.
at org.dom4j.io.SAXReader.read(SAXReader.java:482)
at org.dom4j.io.SAXReader.read(SAXReader.java:343)
at com.pmease.quickbuild.plugin.report.engine.util.XMLHelper.readXML(XMLHelper.java:219)
... 19 more
--------------------------------------------------------------

Although the processing was not executed, the publish step didn't fail. This leaded to the unfavorable situation, that the build was green although there have been test failures!

 All   Comments   Work Log   Change History      Sort Order:
Robin Shen [05/Sep/12 01:32 AM]
Looks like the plugin eat the exception and did not get it re-thrown to let build know about this.