Skip to content

xunit: rename testsuite attribute skip to skipped - #1801

Closed
llipavsky wants to merge 2 commits into
robotframework:masterfrom
llipavsky:master
Closed

llipavsky wants to merge 2 commits into
robotframework:masterfrom
llipavsky:master

Conversation

@llipavsky

Copy link
Copy Markdown

Currently, xunit output looks like:

<testsuite ... skip="0">

However, all examples of JUnit results (and also some other xUnits that look similar) either ignore this attribute completely, or use skipped instead of skip. So the xunit looks like this:

<testsuite ... skipped="0">

This small issue has one bad inpact: Bamboo JUnit parser will not consider the file to be valid when skip is used instead of skipped. So I wrote this patch to change it to skipped. I did not find any xunit specification that would state that the attribute should be skip while skipped is used quite often in existing JUnit files.

However, this change might have some impact to existing users of Robot Framework xunit output, who might already have their custom parsers relying on skip. But are there any?

@robotci

robotci commented Sep 18, 2014

Copy link
Copy Markdown

Admin, can CI be enabled?

@pekkaklarck

Copy link
Copy Markdown
Member

The problem with xUnit outputs is that there is no official standard that covers it. The support for marking non-critical tests as skipped was implemented in RF 2.8, and according to comments to #1408 it was tested at least with Jenkins xUnit plugin. If skipped is actually more widely used than skip I don't see why we couldn't change it, though.

Before making the change at least following tasks need to be done:

  • Test does Jenkins xUnit plugin support also skipped attribute.
  • Send an email to robotframework-users and ask what others think about this.
  • Submit a separate enhancement request to issue tracker. That will make it easier to manage this with other issues.

Even if there would be consensus that skip should be renamed to skipped, I doubt we can do that in RF 2.8.x releases due to backwards compatibility reasons. Doing it in RF 2.9 would also give more time for external Robot related tools to add support for both skipped and skip.

If it turns out that some xUnit tools support skip while others support skipped, there's always a possibility that we add both attributes. That would be better than making the attribute name configurable somehow.

@llipavsky

Copy link
Copy Markdown
Author

Thanks. I have done some further testing with bamboo and I have to say that the fact that skip was not accepted by its JUnit parser was just a bad coincidence (some bug...ehm...feature of bamboo stepped in in that specific way, that it started to work when I changed it from skip to skipped). After workarounding the feature, both skip and skipped works well.

However, normal JUnit files still use skipped instead of skip, but is looks like no real problem (just that robot is different)

So: I am willing to do all the testing and mailing and opening issue for it, but I am not sure whether it is worth it or not, given my recent finding. If you think it is not worth it, just close this PR

@pekkaklarck

Copy link
Copy Markdown
Member

Ok, thanks for investigating this further. Changing skip to skipped probably isn't worth the effort if both are supported by all/most external tools. We can reconsider that if tools that only support the latter emerge. For xUnit result parsers it ought to be trivial to support both of them so I would assume tools only supporting one are rare.

@pekkaklarck

pekkaklarck commented Oct 10, 2018 •

Copy link
Copy Markdown
Member

xUnit consumers have got more strict and nowadays skip isn't anymore generally supported. We now got #2978 about changing it and it's basically a duplicate of this issue. Probably better anyway to keep that open and this one closed. The proposed change in this issue is nevertheless going to be implemented.

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

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants