Skip to content

Support alternative xUnit (JUnit) formats #2292

Closed as not planned
Closed as not planned

Description

@mverma-va

Please add support for creating JUnit xml output report, we need this badly. Since most other tool support that.
Like right now we have pybot -x for generating xUnit xml format report files.
Similarly plz add support to generate JUnit xml format report file.

Or maybe point me to some script which will convert robot output.xml to JUnit format (http://llg.cubic.org/docs/junit/)

Activity

  1. pekkaklarck commented on Jan 9, 2016

    @pekkaklarck
    Member

    How would that jUnit output be different to the current xUnit output?

  2. pekkaklarck commented on Jan 11, 2016

    @pekkaklarck
    Member

    Related to my previous comment, have you tested using the xUnit output?

    See also https://en.wikipedia.org/wiki/XUnit.

  3. mverma-va commented on Jan 11, 2016

    @mverma-va
    Author

    Yes I have tried the xUnit output using the pybot -x option. One difference is that the xunit report file is missing the top level "testsuites" node. But you might have seen the Junit report file begins with "testsuites" node.
    We are using couple of other tools which gives output in stantard Junit format, so it would be nice if we could get a similar junit format output from pybot.
    I am new to this, so not sure how to fix this

  4. pekkaklarck commented on Jan 11, 2016

    @pekkaklarck
    Member

    The problem is that there is no such thing as the standard jUnit format. This is highly annoying.

    The current format used by RF is based on some jUnit output variation, but there could be others. If you can find statistics that other formats are used a lot more widely, we can consider changing the current format. Alternatively you can create a script that converts the current format to a format understood by tools you use. I don't like the idea of us adding multiple xUnit formats when nobody has bothered to create an official standard.

  5. mverma-va commented on Jan 13, 2016

    @mverma-va
    Author

    ok thanks, will workaround my creating our own custom output. This bug can be closed now.

  6. pekkaklarck commented on Jan 13, 2016

    @pekkaklarck
    Member

    After thinking this a little bit more, xUnit format configurable is not a totally impossible idea. I definitely don't want a totally new output, but having an option like --xunitformat to control the format would be OK. That would basically have two preconditions:

    • Someone studies what xUnit XML flavors there are. Based on that we can design this functionality in more detail.
    • Someone is interested enough about this to provide a pull request based on the agreed design.

    Do you @mverma-va have interest to look at this?

  7. pekkaklarck commented on Feb 24, 2016

    @pekkaklarck
    Member

    Anyone interested to add support for xUnit file configuration? If not, I'll close this issue.

  8. davidk1 commented on Feb 28, 2016

    @davidk1

    We are using Bamboo and Robot FW. There is only JUnit parser in Bamboo so we'd appreciate to have JUnit output from Robot FW.

  9. pekkaklarck commented on Mar 2, 2016

    @pekkaklarck
    Member

    @davidk1: Robot already provides JUnit output, we just use more general xUnit name for it. The problem is that there is no official standard for that format and Robot only implements one variant. I'm fine making xUnit format configurable. See my comment above for what it would require.

  10. changed the title [-]Please add support for creating JUnit XML reporting file format output file[/-] [+]Support alternative xUnit (JUnit) formats[/+] on Mar 2, 2016
  11. pekkaklarck commented on Mar 2, 2016

    @pekkaklarck
    Member

    I consider this a valid enhancement and set labels accordingly. Actually getting this implemented requires someone providing a pull request or paying me or someone else for development.

  12. pekkaklarck commented on Mar 2, 2016

    @pekkaklarck
    Member

    See #442 for discussion about adding the original xUnit support.

  13. mverma-va commented on Jun 10, 2016

    @mverma-va
    Author

    Just adding for reference that soapui junit xml report is really well formatted and includes most of the required info.

  14. 23 remaining items

  15. added this to the v3.1 milestone on Oct 10, 2018
  16. pekkaklarck commented on Oct 10, 2018

    @pekkaklarck
    Member

    Or should we actually submit a new issue about skip -> skipped? This issue is about configuring xunit outputs and it seems that's not needed.

  17. removed this from the v3.1 milestone on Oct 10, 2018
  18. pekkaklarck commented on Oct 10, 2018

    @pekkaklarck
    Member

    Thanks to @rasjani we now got issue #2978 about changing skip to skipped and PR #2977 to actually implement that. It seems we don't need any separate configuration to control the xUnit format so this issue can be closed.

    As discussed above, we could also consider adding <testsuite> elements for each test suite, not only to the top-level suite as currently and we could also add time attribute to the <testsuite> elements. These also require separate issues.

  19. added and removed
    help wanted
    on Oct 10, 2018
  20. lightingbijoy commented on Mar 1, 2022

    @lightingbijoy

     DATADOG_API_KEY=api_key DD_ENV=ci datadog-ci junit upload \  ✔  282  09:17:31
    --service robot-framework
    execution_reports/
    Starting upload with concurrency 20.
    Will look for jUnit XML files in execution_reports/
    service: robot-framework
    ❌ Invalid jUnitXML file [execution_reports/output-20220208-110758.xml]: Neither nor are the root tag.
    ❌ Invalid jUnitXML file [execution_reports/output-20220208-110904.xml]: Neither nor are the root tag.
    ❌ Invalid jUnitXML file [execution_reports/output-20220208-121124.xml]: Neither nor are the root tag.
    ❌ Invalid jUnitXML file [execution_reports/output-20220208-150334.xml]: Neither nor are the root tag.
    ❌ Invalid jUnitXML file [execution_reports/output-20220208-152001.xml]: Neither nor are the root tag.
    ❌ Invalid jUnitXML file [execution_reports/output-20220208-152303.xml]: Neither nor are the root tag.
    ❌ Invalid jUnitXML file [execution_reports/output-20220208-164031.xml]: Neither nor are the root tag.
    ❌ Invalid jUnitXML file [execution_reports/output-20220208-164226.xml]: Neither nor are the root tag.
    ❌ Invalid jUnitXML file [execution_reports/output-20220208-183019.xml]: Neither nor are the root tag.
    ❌ Invalid jUnitXML file [execution_reports/output-20220208-183319.xml]: Neither nor are the root tag.
    ❌ Invalid jUnitXML file [execution_reports/output-20220208-232227.xml]: Neither nor are the root tag.
    ❌ Invalid jUnitXML file [execution_reports/output-20220208-233347.xml]: Neither nor are the root tag.
    ❌ Invalid jUnitXML file [execution_reports/output-20220208-233437.xml]: Neither nor are the root tag.
    ❌ Invalid jUnitXML file [execution_reports/output-20220208-233627.xml]: Neither nor are the root tag.
    ❌ Invalid jUnitXML file [execution_reports/output-20220208-234226.xml]: Neither nor are the root tag.
    ❌ Invalid jUnitXML file [execution_reports/output-20220208-234254.xml]: Neither nor are the root tag.
    ❌ Invalid jUnitXML file [execution_reports/output-20220209-000937.xml]: Neither nor are the root tag.
    ❌ Invalid jUnitXML file [execution_reports/output-20220209-001044.xml]: Neither nor are the root tag.
    ❌ Invalid jUnitXML file [execution_reports/output-20220209-004704.xml]: Neither nor are the root tag.
    ❌ Invalid jUnitXML file [execution_reports/output-20220209-004739.xml]: Neither nor are the root tag.
    ❌ Invalid jUnitXML file [execution_reports/output-20220209-004851.xml]: Neither nor are the root tag.

    I am getting this error as the parser is looking for testsuites or testsuite in the output xml. How can I fix this?

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions