Skip to content

Better support for XML options #5

Open
@e-j

Description

@e-j

The XML options of Qt Test library is a major feature for integration with external tools.

It can be used for produce test log that will be then be parse by IDE ( Eclipse Unit Tests runner) or continuous integration ( Jenkins XUnit)

As is with the actual MultiTest, those integration need an extra scripting phase for :

  1. Create a single consistent XML output.
  2. Save to different files each cases result

Note that other options provides by Qt Test Lib ( lightxml and xunitxml) should be concerned too.

Consistent single file

The purpose will be to have a single consistent XML file that cover all test suite.
Each case have a section.

I've experiment that it's possible to produce a similar file in few steps from the output of current MultiTest runner with the -xml option

  1. Create a top level <TestCase name=testSuite> XML element
  2. For all cases remove XML header and output them are children of the test suite element
  3. (Optional for Eclipse) : BenchmarkResult need a rename of WalltimeMilliseconds to walltime
  4. Append after the cases results a list of all messages
  5. Close the top level </TestCase>

File splitting

The purpose is to be able to save into one directory a XML file for each of the test case.

The XML header is an easy tag to detect the start of a new case.
Name of outputs files can just be incremented from one case to the next one ( result_1.xml, result_2.xml, etc.)

Metadata

Metadata

Assignees

No one assigned

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions