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

junit output of jasmine-reporters fails to parse

    XMLWordPrintable

    Details

    • Similar Issues:

      Description

      WARNING: The converted file for the input file '/apps/.../workspace/build/e2e-results.xml' doesn't match the JUnit format
      ...
      ERROR: Premature end of file.
       

      Probably since this commit:

      With this commit, the output from jasmine-reporters is not valid anymore (at least attribute testsuite->disabled is rejected).

      We also opened a bug in jasmine-reporters so they can produce valid xml (https://github.com/larrymyers/jasmine-reporters).

      Just for reference: JUnit itself uses this schema.

      Snippet from the generated e2e-results.xml file:

      <?xml version="1.0" encoding="UTF-8" ?>
      <testsuites disabled="127" errors="0" failures="0" tests="129" time="9.783">
       <testsuite name="001 Login Logout" timestamp="2018-06-12T16:23:22" hostname="localhost" time="4.482" errors="0" tests="0" skipped="0" disabled="0" failures="0">
       </testsuite>
       <testsuite name="001 Login Logout.when the user is logged out" timestamp="2018-06-12T16:23:22" hostname="localhost" time="4.482" errors="0" tests="1" skipped="0" disabled="0" failures="0">
        <testcase classname="001 Login Logout.when the user is logged out" name="it should login an existing user and redirect to the dashboard page" time="2.937" />
       </testsuite>
       <testsuite name="001 Login Logout.when the user is logged out.and then signs in " timestamp="2018-06-12T16:23:26" hostname="localhost" time="0.517" errors="0" tests="1" skipped="0" disabled="0" failures="0">
        <testcase classname="001 Login Logout.when the user is logged out.and then signs in " name="it should logout the user" time="0.514" />
       </testsuite>
       <testsuite name="100 Globale suche" timestamp="2018-06-12T16:23:26" hostname="localhost" time="0.001" errors="0" tests="2" skipped="0" disabled="2" failures="0">
        <testcase classname="100 Globale suche" name="should find a search result and navigate to the entity" time="0">
         <skipped />
        </testcase>
        <testcase classname="100 Globale suche" name="should show existing Kita Fisch in &quot;Globale Suche&quot;" time="0.001">
         <skipped />
        </testcase>
       </testsuite>
      </testsuites>

        Attachments

          Activity

          Hide
          br_michael Michael Wietzke added a comment -

          Also JUnit Reports generated by the Tool Ranorex are broken since 2.0.1. The Report generated by Ranorex looks like

          {{<?xml version="1.0" encoding="utf-8"?>
          <testsuite name="Builder" tests="3" failures="0" errors="0" time="511" disabled="0" skipped="0" timestamp="2018-06-13T04:28:01" hostname="hostname">
          <testcase name="CheckAvailableVisu" time="207" classname="Builder.ExternalVisualization">
          <system-out><![CDATA[ ... ]]></system-out>
          </testcase>
          <testcase name="CheckNotDefinedTpNotAvailableVisu" time="153" classname="Builder.ExternalVisualization">
          <system-out><![CDATA[ ... ]]></system-out>
          </testcase>
          <testcase name="CheckNotInstalledTpNotAvailableVisu" time="151" classname="Builder.ExternalVisualization">
          <system-out><![CDATA[ ... ]]></system-out>
          </testcase>
          </testsuite>}}

          Show
          br_michael Michael Wietzke added a comment - Also JUnit Reports generated by the Tool Ranorex are broken since 2.0.1. The Report generated by Ranorex looks like {{<?xml version="1.0" encoding="utf-8"?> <testsuite name="Builder" tests="3" failures="0" errors="0" time="511" disabled="0" skipped="0" timestamp="2018-06-13T04:28:01" hostname="hostname"> <testcase name="CheckAvailableVisu" time="207" classname="Builder.ExternalVisualization"> <system-out><![CDATA[ ... ]]></system-out> </testcase> <testcase name="CheckNotDefinedTpNotAvailableVisu" time="153" classname="Builder.ExternalVisualization"> <system-out><![CDATA[ ... ]]></system-out> </testcase> <testcase name="CheckNotInstalledTpNotAvailableVisu" time="151" classname="Builder.ExternalVisualization"> <system-out><![CDATA[ ... ]]></system-out> </testcase> </testsuite>}}
          Hide
          nfalco Nikolas Falco added a comment - - edited

          JUnit is a library to run test. The report is something defined by other tools. The most used report are those create by ant step (the first one) or maven (provided by surefire plugin). The XSD in this plugin meet both schemas and rely on junit to parse and create a report. Disabled attribute is not taken into account by junit so it does not fit the XSD.

          What those custom attributes represents?

          Show
          nfalco Nikolas Falco added a comment - - edited JUnit is a library to run test. The report is something defined by other tools. The most used report are those create by ant step (the first one) or maven (provided by surefire plugin). The XSD in this plugin meet both schemas and rely on junit to parse and create a report. Disabled attribute is not taken into account by junit so it does not fit the XSD. What those custom attributes represents?
          Hide
          nfalco Nikolas Falco added a comment -

          Christoph Linder jasmine also support NUnitXmlReporter

          Show
          nfalco Nikolas Falco added a comment - Christoph Linder jasmine also support NUnitXmlReporter
          Hide
          nfalco Nikolas Falco added a comment - - edited

          Disable is not a valid attribute for the testsuite element of supported JUnit report format.
          I do not know what disabled mean, junit supports only error, failure or skipped scenarios.
          If you would support the custom junit format for jasmine please select the "Custom Tool" as test type and provide an XSL to conver the generated report to a correct format of the supported JUnit format. In the "custom stylesheet" value you could insert the path of your XSL file that could be absolute on the server (master) or relative to the workspace.

          Show
          nfalco Nikolas Falco added a comment - - edited Disable is not a valid attribute for the testsuite element of supported JUnit report format. I do not know what disabled mean, junit supports only error, failure or skipped scenarios. If you would support the custom junit format for jasmine please select the "Custom Tool" as test type and provide an XSL to conver the generated report to a correct format of the supported JUnit format. In the "custom stylesheet" value you could insert the path of your XSL file that could be absolute on the server (master) or relative to the workspace.
          Hide
          nfalco Nikolas Falco added a comment - - edited

          Michael Wietzke did you apply the official ranorex guide?

          https://www.ranorex.com/blog/make-your-ranorex-report-fully-comprehensible-for-jenkins-by-using-xunit

           

          The Ranorex XSl produce a valid JUnit report than embedded mechanism in version 7.0. Consider to fill a bug to ranorex.

          Show
          nfalco Nikolas Falco added a comment - - edited Michael Wietzke did you apply the official ranorex guide? https://www.ranorex.com/blog/make-your-ranorex-report-fully-comprehensible-for-jenkins-by-using-xunit   The Ranorex XSl produce a valid JUnit report than embedded mechanism in version 7.0. Consider to fill a bug to ranorex.
          Hide
          br_michael Michael Wietzke added a comment -

          I followed a newer Version of the ranorex guide.
          https://www.ranorex.com/blog/integrating-ranorex-automation-in-jenkins-continuous-integration-process/

          This is using the embedded mechanism in Version 7.0. The bug report to ranorex will be done with a reference to this one.

          Show
          br_michael Michael Wietzke added a comment - I followed a newer Version of the ranorex guide. https://www.ranorex.com/blog/integrating-ranorex-automation-in-jenkins-continuous-integration-process/ This is using the embedded mechanism in Version 7.0. The bug report to ranorex will be done with a reference to this one.

            People

            Assignee:
            nfalco Nikolas Falco
            Reporter:
            christophlinder Christoph Linder
            Votes:
            2 Vote for this issue
            Watchers:
            4 Start watching this issue

              Dates

              Created:
              Updated:
              Resolved: