Skip to content

Support skipping non-critical tests in xUnit outputs #1408

Closed

Description

@spooning

Originally submitted to Google Code by nath.drew on 11 Apr 2013

Integrating XUnit with something like TeamCity (and one of it's XUnit interpreters) doesn't cater for non-critical tests.

There should at least be an option for these tests to be marked as <skipped/>, otherwise it will fail the build.

Effectively, it should be the same as if you marked a JUnit test as @⁠Ignored.

We want to use the XUnit feature as it enables TeamCity to understand that a build has started to fail as soon as one of our Robot Framework XUnit xml files have been written.

There has been mention of this under:
https://code.google.com/p/robotframework/issues/detail?id=442
https://code.google.com/p/robotframework-maven-plugin/issues/detail?id=12

But I haven't found an existing issue to cover this.

Many thanks
Nathan

Activity

  1. added this to the 2.8 milestone on Jun 29, 2014
  2. spooning commented on Jun 29, 2014

    @spooning
    ContributorAuthor

    Originally submitted to Google Code by @pekkaklarck on 23 Apr 2013

    I haven't used xunit outputs much but somehow handling non-critical tests definitely sounds like a good idea. With my limited knowledge I cannot really comment what is the best way to do that, though.

    It would be best if no new options were needed, so automatically marking all non-critical tests <skipped/> sounds pretty tempting. If that's not always a good idea, and especially if it causes backwards-compatibility issues, a new option needs to be added.

    Could you start a discussion on robotframework-users about this subject to see what others think? If there is a consensus, and preferably also a patch, I don't see why this couldn't be included into RF 2.8.

  3. spooning commented on Jun 29, 2014

    @spooning
    ContributorAuthor

    Originally submitted to Google Code by @asyrjasalo on 24 Apr 2013

    This issue was updated by revision 4d724ca93ca8.

    Implemented. Needs to be tested on Windows and documented.

  4. spooning commented on Jun 29, 2014

    @spooning
    ContributorAuthor

    Originally submitted to Google Code by @asyrjasalo on 24 Apr 2013

    Updated wrong issue. Ignore comment #3.

  5. spooning commented on Jun 29, 2014

    @spooning
    ContributorAuthor
  6. spooning commented on Jun 29, 2014

    @spooning
    ContributorAuthor

    Originally submitted to Google Code by @jussimalinen on 10 May 2013

    This could be useful in Maven Plugin as well. I will mark this for 2.8... We should discuss this more on the user group before implementing though.

  7. spooning commented on Jun 29, 2014

    @spooning
    ContributorAuthor

    Originally submitted to Google Code by @jussimalinen on 21 May 2013

    I implemented this now with a commandline option --xunitSkipNoncritical

    This will mark all non critical tests as skipped with the actual test status as skip message.

    Still needs to be checked if this output is okay for other tools and also we need to document this...

    Relevant commits: r33c339dfcca3 and rb3a7195e1b70

  8. spooning commented on Jun 29, 2014

    @spooning
    ContributorAuthor

    Originally submitted to Google Code by @pekkaklarck on 21 May 2013

    This issue was updated by revision 6f3139eeaae4.

    Code and tests looked very good. Did some clean-up to them while reviewing, though.

    Remaining tasks:

    • Test the implementation with external tool (incl. our Maven plugin).
    • Document the enhancement in the User Guide.
  9. spooning commented on Jun 29, 2014

    @spooning
    ContributorAuthor

    Originally submitted to Google Code by @pekkaklarck on 21 May 2013

    Should the skip message contain both the status and the possible message, for example, in format 'FAIL: Message'? Notice that also passed tests may contain a message so also 'PASS: Message' would be possible.

  10. spooning commented on Jun 29, 2014

    @spooning
    ContributorAuthor

    Originally submitted to Google Code by @jussimalinen on 27 May 2013

    I gave this a try with jenkins junit publishing: works like a charm. Non critical tests are shown as skipped and wont fail the build.

  11. spooning commented on Jun 29, 2014

    @spooning
    ContributorAuthor

    Originally submitted to Google Code by @jussimalinen on 27 May 2013

    Added test messages to status in r69c076cffd59

  12. spooning commented on Jun 29, 2014

    @spooning
    ContributorAuthor

    Originally submitted to Google Code by @jussimalinen on 27 May 2013

    Documented in rff346a28049e

  13. spooning commented on Jun 29, 2014

    @spooning
    ContributorAuthor

    Originally submitted to Google Code by @pekkaklarck on 27 May 2013

    This issue was updated by revision 2b856d86cc28.

    Good to hear integration worked well. Is the skip message shown somewhere?

    Changes looked good. I updated the whole xUnit section in the UG, though.
    Can you Jussi take a look at the latest doc changes, enhance/fix them if
    needed, and close this issue when done?

  14. spooning commented on Jun 29, 2014

    @spooning
    ContributorAuthor

    Originally submitted to Google Code by nath.drew on 20 Jun 2013

    FYI the release notes page
    https://code.google.com/p/robotframework/wiki/ReleaseNotes28#Robot_Framework_2.8

    Does not outline the parameter - it might be good to make it clear on that page?

    Thanks
    Nathan

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

Metadata

Metadata

Assignees

Projects

No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions