Uploaded image for project: 'Jenkins'
  1. Jenkins
  2. JENKINS-892

Nunit plugin : non ascii character problem

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Fixed
    • Icon: Major Major
    • plugin-proposals
    • None
    • Platform: All, OS: All

      The use of a non-ascii character will give a exception :

      started
      Transforming NUnit tests results
      Recording test results
      FATAL: Failed to read C:\Documents and Settings\3167
      \.hudson\jobs\Nunit\workspace\temporary-junit-
      reports\TEST.HRATestCenter.HRABusinessLayer.Process.ComputeDayAutoTest.xml
      hudson.util.IOException2: Failed to read C:\Documents and Settings\3167
      \.hudson\jobs\Nunit\workspace\temporary-junit-
      reports\TEST.HRATestCenter.HRABusinessLayer.Process.ComputeDayAutoTest.xml
      at hudson.tasks.junit.TestResult.parse(TestResult.java:119)
      at hudson.tasks.junit.TestResult.parse(TestResult.java:83)
      at hudson.tasks.junit.TestResult.<init>(TestResult.java:66)
      at hudson.tasks.junit.JUnitResultArchiver$1.invoke
      (JUnitResultArchiver.java:67)
      at hudson.tasks.junit.JUnitResultArchiver$1.invoke
      (JUnitResultArchiver.java:52)
      at hudson.FilePath.act(FilePath.java:280)
      at hudson.tasks.junit.JUnitResultArchiver.perform
      (JUnitResultArchiver.java:52)
      at hudson.plugins.nunit.NUnitArchiver.performJUnitArchiver
      (NUnitArchiver.java:115)
      at hudson.plugins.nunit.NUnitArchiver.invoke(NUnitArchiver.java:73)
      at hudson.plugins.nunit.NUnitArchiver.invoke(NUnitArchiver.java:33)
      at hudson.FilePath.act(FilePath.java:280)
      at hudson.plugins.nunit.NUnitPublisher.perform(NUnitPublisher.java:53)
      at hudson.model.Build$RunnerImpl.post2(Build.java:138)
      at hudson.model.AbstractBuild$AbstractRunner.post
      (AbstractBuild.java:243)
      at hudson.model.Run.run(Run.java:595)
      at hudson.model.Build.run(Build.java:103)
      at hudson.model.ResourceController.execute(ResourceController.java:66)
      at hudson.model.Executor.run(Executor.java:62)
      Caused by: org.dom4j.DocumentException: Invalid byte 1 of 1-byte UTF-8
      sequence. Nested exception: Invalid byte 1 of 1-byte UTF-8 sequence.
      at org.dom4j.io.SAXReader.read(SAXReader.java:484)
      at org.dom4j.io.SAXReader.read(SAXReader.java:264)
      at hudson.tasks.junit.SuiteResult.<init>(SuiteResult.java:38)
      at hudson.tasks.junit.TestResult.parse(TestResult.java:111)
      ... 17 more

      This extract of the complete nunit result xml file is the cause of the
      exception :

      <test-case
      name="HRATestCenter.HRABusinessLayer.Process.ComputeDayAutoTest.AutoCompute_0000
      01" executed="True" success="False" time="0.172" asserts="7">
      <failure>
      <message><![CDATA[Test 'VM01' n°1, Clockin #0 (at 1/2/2006 7:45:00 AM) on
      field ClDttDate.
      Expected: 'this.myDateNullValue'.
      Have: '1/01/0001 0:00:00'
      expected:<1/01/1900 0:00:00>
      but was:<1/01/0001 0:00:00>]]>
      </message>
      <stack-trace><![CDATA[ at
      HRATestCenter.HRABusinessLayer.Process.ComputeDayAutoTest.AutoCompute_000001()
      in
      C:\DevTree\src\trunk\TestCenter.root\HRATestCenter\HRABusinessLayer\Process\Comp
      uteDayAutoTest.cs:line 103
      ]]>
      </stack-trace>
      </failure>
      </test-case>

      We have the character 'n°1' in the xml!
      If I replace for example the 'n°1' by 'nr.1', then all will work like expected.

      Regards,
      Eric

            redsolo redsolo
            evb evb
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

              Created:
              Updated:
              Resolved: