Skip to content

JUnit XML results

You can generate JUnit XML output in many different automation tools, for example:

Defaults

Smart

If smart is enabled and all <testcase> element have a filled classname="" attribute:

Will group recursively by splitting the classname at every . character. This means the following:

Say we have an XML file with the following data:

<testsuite name="rspec">
<testcase classname="spec.models.company_spec" name="Subscribe"></testcase>
<testcase classname="spec.models.company_spec" name="Add an owner"></testcase>
<testcase classname="spec.models.company_spec" name="Expect 1 owner" ></testcase>
<testcase classname="spec.models.container_spec" name="Add container"></testcase>
<testcase classname="spec.models.container_spec" name="Expect 1 container"></testcase>
</testsuite>

smart disabled:

  • spec
    • Subscribe
    • Add an owner
    • Expect 1 owner
    • Add container
    • Expect 1 container

smart enabled

  • spec
    • Spec
      • Models
        • Company spec
          • Subscribe
          • Add an owner
          • Expect 1 owner
        • Container spec
          • Add container
          • Expect 1 container

JUnit XML format

Undocumented field

system-out and system-err

On this Stack Overflow page, it is explained that there are more accepted fields than IBM originally shows. We also look for these fields. A <testcase> can contain a <system-out> element. We will read its contents and write it to exception_backtrace, see Calliope format.