Troubleshooting

Use this Go community space to get help troubleshooting any product related issues.

This is a public Discussion Area  publicRSS

Post

    Tom Bell
    nUnit test results failing to publish
    Post posted July 1, 2009 by Tom Bell
    2943 Views, 6 Comment
    Topic:
    nUnit test results failing to publish
    Body:

    Hi Guys

    Im hoping someone can shed some light on this. We're evaluating Cruise as a potential candidate to replace Cruise Control .NET and so far everything is behaving except the auto publish of our nUnit test results. Im seeing the error:

    [cruise] Uploading artifacts from C:\CruiseAgent\pipelines\Nominations\build\reports to 
    [defaultRoot]
    Unable to publish test properties. Error was javax.xml.transform.TransformerException:
    com.sun.org.apache.xml.internal.utils.WrappedRuntimeException:
    The processing instruction target matching "[xX][mM][lL]" is not allowed.
    Could not publish property null
    Could not publish property null
    Could not publish property null
    Could not publish property null

    The tests are being run via nAnt using the same target our CC .Net box uses which works fine.
    The task in cruise completes and the XML result file is generated in the /reports directory
    and is about 600kb
    <nunit2>
    <formatter type="Xml" extension=".xml" usefile="true" outputdir="${reports.dir}"/>
    <formatter type="Plain" usefile="false" />
    <test assemblyname=".\Test.dh.Nominations\bin\Debug\Test.dh.Nominations.dll" />
    </nunit2>

    using
    nUnit : 2.4.6
    nant : nant-0.86-beta1

    Comment

    • Derek Yang
      posted July 1, 2009 by Derek Yang

      Hi Tom,

      Thank you for posting. This is because nunit generates reports using UTF-8 with byte-order-mark (BOM) in the xml. 

      In order to investigate this issue, can you please give us a bit more information?

      1) what is the version of cruise that you are using?

      2) can you send us a copy of the nunit report to ccedev / at / thoughtworks.com.

      Also, in case this is something blocking you, you might want to take a look at this post which suggests a workaround. 

      Regards,

      Derek

    • Tom Bell
      posted July 2, 2009 by Tom Bell

      Hi Derek

      I had a look at that post but saw the comment that it would be fixed in the next version due out in a month, the post was dated 2006 so i thought this was a different issue

      Im using Cruise 1.2.1(6310-134674c9634f) and have mailed the file to ccdev

      Its not blocking anything at the moment, ill look at using that fix a bit later.

    • Derek Yang
      posted July 3, 2009 by Derek Yang

      Hi Tom,

      Thank you for sending the test result file. 

      We are unable to reproduce this issue based on the file that you provided.  In order to further investigate, can you please send us your cruise config file (cruise-config.xml) and all xml result files under Nominations\build\reports? We will investigate and get back to you as soon as we can.

      Regards,

      Derek

    • Derek Yang
      posted July 5, 2009 by Derek Yang

      I'm posting Tom's comment via email on how this issue is resolved so that anyone who is interested in this topic can take it as a reference:

      "Test.dh.Nominations.dll-results.xml had to be taken from the artefact repository as it gets deleted when the second test job runs. I added the custom nant task to resave the file and it fixed the problem, I disabled it to get a copy of these reports"

    • J. Divis
      posted March 12, 2010 by J. Divis

      To clarify, if there is only one test job in the pipeline, then would you not see this error?

      I installed Cruise at the beginning of the week and just got around to creating some pipelines yesterday. All seems to be working well with my Nant, Nunit, SVN setup, except I receive the same error Tom does above, copied from my log here, for clarity:

      [cruise] Uploading artifacts from C:\Program Files\Cruise Agent\pipelines\CashFlowTestsNant\test-results to [defaultRoot]
      Unable to publish test properties. Error was javax.xml.transform.TransformerException: com.sun.org.apache.xml.internal.utils.WrappedRuntimeException: The processing instruction target matching "[xX][mM][lL]" is not allowed.
      Could not publish property null
      Could not publish property null
      Could not publish property null
      Could not publish property null

      [cruise] Uploading artifacts from C:\WINDOWS\TEMP\result\index.html to testoutput

      [cruise] Uploading artifacts from C:\WINDOWS\TEMP\result to testoutput

      If I followed Mr. Yang's last post, the issue was that two jobs were running in the pipeline, and the results of the second were overwriting, or deleting the first. I did not have a second job, but had a second pipeline that I deleted, but am receiving the same error still.

      Mr. Yang asked of Tom the following information, so I am providing it here as well:

      Cruise Server Version: 1.3.2(8704-77864ef38eda)
      JVM version: 10.0-b23
      OS Information: Windows XP 5.1
      Usable space in artifacts repository: 28701 Mb
      Database schema version: 44
      License expiry date: 2011-03-05
      Number of remote agents Cruise is licensed for: 0
      Number of users Cruise is licensed for: 5
      Cruise edition: Free

      I also took a look at the post, re: the BOM, and will create the Task, if that is what solves it, but as Jez points out in the post, I think that was supposed to be solved by the version I am using.

      I have also sent an email to the address Mr. Yang gave above, with the results.xml file, as well as the cruise-config.xml file. [edit] I received an email back from googlemail.com stating that the group might be closed? [/edit]

      Thanks in advance for any help you are able to provide.

    • Raghunandan Rao
      posted March 15, 2010 by Raghunandan Rao

      Hi,

      You can also see this error if there are leading spaces before the xml processing instruction. To investigate the problem we will need  the xml and config files. sorry you cannot send mails to the ccedev address anymore. Can you send them to this address instead rramakri<at>thoughtworks<dot>com ?

      Regards,

      Raghu