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

JsUnit plugin does not work with JsUnit 2.2 final

    XMLWordPrintable

    Details

    • Type: Patch
    • Status: Closed (View Workflow)
    • Priority: Blocker
    • Resolution: Fixed
    • Component/s: jsunit-plugin
    • Labels:
      None
    • Environment:
      JsUnit 2.2 final
    • Similar Issues:

      Description

      The current version does not appear to work with the final version of JsUnit 2.2 released at the end of November. The current XSL looks for testCase elements, but 2.2 produces a testCaseResults element with testCaseResult child elements.

      The attached patch contains the following changes to the jsunit-to-junit.xsl:

      1. Works with output from JsUnit 2.2 final.
      2. Errors are counted and processed properly. Errors were ignored and translated to successes in the previous version.
      3. The template for extracting the classname was replaced with a more efficient algorithm.
      4. Support was added for recording results for each browser. Previously executing the tests in a second browser would overwrite the results of produced by running them in the first browser.


      This produces test result output where each browser is a test class:

      • JsUnit.Internet Explorer
      • JsUnit.Firefox
      • JsUnit.Chrome
      • JsUnit.Safari

      This is necessary when you execute your tests in multiple browsers with haltonerror="false" to report all possible test failures.

        Attachments

          Activity

          Hide
          scm_issue_link SCM/JIRA link daemon added a comment -

          Code changed in hudson
          User: : ricktw
          Path:
          trunk/hudson/plugins/jsunit/src/main/resources/hudson/plugins/jsunit/jsunit-to-junit.xsl
          http://jenkins-ci.org/commit/26242
          Log:
          stylesheet changed to support JSUnit 2.2 (testCases changed to testCaseResults).
          Also fixed a bug when using multiple browsers (which is very common of cource); only test results of one browser were shown.
          Patch provided by 'mrobinet' (http://issues.jenkins-ci.org/browse/JENKINS-5333)

          Show
          scm_issue_link SCM/JIRA link daemon added a comment - Code changed in hudson User: : ricktw Path: trunk/hudson/plugins/jsunit/src/main/resources/hudson/plugins/jsunit/jsunit-to-junit.xsl http://jenkins-ci.org/commit/26242 Log: stylesheet changed to support JSUnit 2.2 (testCases changed to testCaseResults). Also fixed a bug when using multiple browsers (which is very common of cource); only test results of one browser were shown. Patch provided by 'mrobinet' ( http://issues.jenkins-ci.org/browse/JENKINS-5333 )
          Hide
          ricktw Rick Oosterholt added a comment -

          Fixed in version 0.4 (applied patch)

          Show
          ricktw Rick Oosterholt added a comment - Fixed in version 0.4 (applied patch)

            People

            Assignee:
            ricktw Rick Oosterholt
            Reporter:
            mrobinet mrobinet
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

              Dates

              Created:
              Updated:
              Resolved: