Skip to content

Junit XML output #130

Open
Open

Description

@theDogOfPavlov

Whilst some of the CI systems will work natively with the default unittest-cpp XML output format, others just become a grind of fudges and XSLT. For the latter, a vanilla Junit format XML output would make everything seamless.

To solve my personal use case, I wrote an extension of UnitTest::TestReporter rather than deferred, mostly for two reasons: the first is that I simply couldn't get the deferred version to work reliably without core dumping on memory handling in the library (this is the Ununtu package, so a bit old and possibly down to build-time challenges too); the second is that Junit only accepts a single failure within a testcase, so there's no actual requirement to defer at all.

Anyway, the code works fine for me and I'm perfectly happy to contribute it back into the project if it would also save someone else some time and effort.

It has crossed my mind that this is an obvious extension to the library though, so there may be a very good reason that it isn't already there. Hence tagging this issue, so the maintainers have a chance to tell me to keep my scabby code to myself. ;)

Activity

  1. pjohnmeyer commented on Sep 8, 2016

    @pjohnmeyer
    Member

    I'd be happy to include a JUnitXmlReporter in the project. It's actually slightly better that you not rely on DeferredTestReporter because it may be going away at some point.

  2. theDogOfPavlov commented on Sep 8, 2016

    @theDogOfPavlov
    Author

    Cool, I'll clean the code up and add it in next week.

  3. jontte75 commented on Sep 13, 2018

    @jontte75

    Hello, any news on this one?
    I'm working with a project, where we use unittest-cpp, and would need a XML-reporter which produces JUnit XML-format (because of Jenkins)

  4. Botched135 commented on Oct 21, 2019

    @Botched135

    I will start taking a look at this as we have the same requirements

  5. Botched135 commented on Oct 23, 2019

    @Botched135

    A question for @pjohnmeyer . Can I base it off DeferredTestReporter or is it still the plan that it might be removed at some point?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions