Uploaded image for project: 'Qt'
  1. Qt
  2. QTBUG-95424

Improve teslib JUnit XML output conformance and detail

    XMLWordPrintable

    Details

    • Type: Task
    • Status: Reported
    • Priority: Not Evaluated
    • Resolution: Unresolved
    • Affects Version/s: None
    • Fix Version/s: None
    • Component/s: Testing: qtestlib
    • Labels:
      None
    • Technical Risk:
      Normal

      Description

      History of the JUnit XML format

      The JUnit test framework did not initially have any XML reporting facilities built in [1]. Instead, the XML report was generated by the Apache Ant JUnit task [2].

      Many users interacted with these reports via the Jenkins JUnit plugin, which provided graphical visualization of the test results [3].

      Due to the lack of an official XML schema for the Apache Ant JUnit report there was some confusion about what the actual format was. People started documenting the de-facto format, both as produced by Ant [4], and as consumed by Jenkins [5].

      Over time other test frameworks started producing "JUnit XML" reports, based on some version or variant of the Ant JUnit output. One of these was the Maven Surefire plugin, which serves the same role as Apache Ant in running tests and producing XML reports. Its XML format was based on the Ant JUnit format, but has nowadays slightly diverged [6].

      Modern test reporting tools, such as the Jenkins xUnit plugin [7], will typically support both the original Apache Ant JUnit format and the more modern/expressive Maven Surefire format.

      [1] Later added in https://github.com/junit-team/junit5/issues/86
      [2] https://github.com/apache/ant/blob/master/src/main/org/apache/tools/ant/taskdefs/optional/junit/XMLJUnitResultFormatter.java
      [3] https://plugins.jenkins.io/junit/
      [4] https://github.com/windyroad/JUnit-Schema
      [5] https://github.com/junit-team/junit5/blob/main/platform-tests/src/test/resources/jenkins-junit.xsd
      [6] https://github.com/apache/maven-surefire/blob/master/maven-surefire-plugin/src/site/resources/xsd/surefire-test-report-3.0.xsd
      [7] https://plugins.jenkins.io/xunit/

      Testlib's JUnit XML support

      Introduced in c667fd7d3663da60449c89356bd17fa7bb69c47d by Petref

        Attachments

        No reviews matched the request. Check your Options in the drop-down menu of this sections header.

          Activity

            People

            Assignee:
            vestbo Tor Arne Vestbø
            Reporter:
            vestbo Tor Arne Vestbø
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Dates

              Created:
              Updated: