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

Does not recognize py.test generated JUnit files

    Details

    • Similar Issues:

      Description

      Supplying a `py.test` generated JUnit XML file results in "Unknown xml file format" error.

      By trial and error I've found out the reason is that `py.test` writes the whole file as single line, i.e.

      <?xml version="1.0" encoding="utf-8"?><testsuite errors="0" failures="0" name="pytest" skips="8" tests="2499" time="106.752"><testcase classname="src.whmonit.client.sensors.fsstat.test.fsstat_test.TestFsstat" file="src/whmonit/client/sensors/fsstat/test/fsstat_test.py" line="11" name="test_common_usage" time="0.00198578834534"></testcase>(...snip...)</testsuite>
      

      but the format detector in the plugin requires XML header to be separate line. When I change the file to

      <?xml version="1.0" encoding="utf-8"?>
      <testsuite errors="0" failures="0" name="pytest" skips="8" tests="2499" time="106.752"><testcase classname="src.whmonit.client.sensors.fsstat.test.fsstat_test.TestFsstat" file="src/whmonit/client/sensors/fsstat/test/fsstat_test.py" line="11" name="test_common_usage" time="0.00198578834534"></testcase>(...snip...)</testsuite>
      

      it works fine.

      For now I'm working around this by `sed`ing in the newline, but it would be nice to get this working OOB.

        Attachments

          Activity

          Show
          artem_fedorov Artem Fedorov added a comment - Fixed in  https://github.com/jenkinsci/performance-plugin/pull/130

            People

            • Assignee:
              artem_fedorov Artem Fedorov
              Reporter:
              kenjitakahashi Karol Woźniak
            • Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: