JUnit parsing requires UTF-8 encoded XML input files in various situations

XMLWordPrintable

    • 1
    • Severity 2 - Major
    • 0

      Issue Summary

      Environment

      The issue ocorres independent from the build plan being run on Bamboo Server, local or remote Bamboo agent (tested out on agent run under Linux and Windows).

      Steps to Reproduce

      Failure sceanrio (I), single UTF-8 / UTF-16 JUnit parsing

      1. Setup a build plan and input a UTF-8 and a UTF-16 encoded XML file (e.g utilizing a repository and the Source Code Checkout task)
      2. Add a JUnit Parser task for the UTF-8 XML only and then only for the UTF-16 XML and run each one

      Failure sceanrio (II), within one plan stage

      1. Setup a build plan and input a UTF-8 and a UTF-16 encoded XML file
      2. Add a Junit Parser task for the for the UTF-8 encoded XML
      3. Then add another JUnit Parser task for the UTF-16 encoded XML
      4. Run the build plan (parsing the UTF-8 XML prior to the UTF16 one)--
      5. The change the order of XML parsing, so trigger MJUnit for UTF-16 before triggering JUnit Parser for UTF-8
      6. Run the build plan in this order

      Failure scenario (III), on a second plan stage

      1. Setup a Bamboo build plan with two stages
      2. For the first stages input a UTF-8 encoded XML file and run JUnit Parser for it
      3. For the first stage feed in a UTF-16 encoded XML file and also run JUnit Parser for it; then run this build plan
      4. Now change the second stage to also XML parse a UTF-8 XML via a JUnit Parser task and again, run the plan

      Expected Results

      For sceanrio (I) UTF-8 paring should succeed and UTF-16 parsing too.

      For sceanrio (II), independent of order of UTF-8 and UTF-16 parsing, both runs should passes.

      For sceanrio (III) the combination UTF-8 before UTF-16 XML parsing as well as a series of UTF-8 JUnit Parser tasks should succeed.

      Actual Results

      In fact, for sceanrio (I) only UTF-8 parsing passes with success, UTF-16 parsing failsd.

      In case of scenario (II) build passes when the UTF-8 XML is parsed before the UTF-16 one (steps 1 to 3). Otherwise (step 5) it fails with build log print-out: "Failing task since test cases were expected but none were found".

      Scenario (III) shows that a sequence of stages all with JUnit parsing of an XML in UTF-8 format passes. Once adding a stage with a UTF-16 formatted XML makes the build fail due to the last (UTF-16) JUnit task failing with the same error message, namely "Failing task since test cases were expected but none were found". 

      Note

      For Bamboo 5.15.5 UTF-16 parsing via JUnit suceeds under all conditions.

      Workaround

      Only workaround known at present is to use the JUnit Parser task only with UTF-8 XML input (or in the passing UTF-8 / UTF-16 combinations, as sketched above).

              Assignee:
              Unassigned
              Reporter:
              Gerhard Forster (Inactive)
              Votes:
              1 Vote for this issue
              Watchers:
              5 Start watching this issue

                Created:
                Updated:
                Resolved: