-
Notifications
You must be signed in to change notification settings - Fork 517
format of TAP output for skipped tests is incorrect #141
Comments
@harschware Could you link the relevant section of the TAP specification? |
There isn't an example in the TAP specification of a test with description that is also skipped, which is why I showed two TAP consumers that now work as expected when the TAP output is corrected. But as you can see here: http://screencast.com/t/uXzdoKpoP the general format shows clearly that a test output contains a description followed by a directive. There is an example just below that where it shows a TODO directive that does it correctly (TODO and skip are both directives per the specification). For whatever reason for all the examples of skip they remove the description, which is allowable per the specification. In the case of BATS, it was a false assumption that the description should be moved into the comment section and doing so causes TAP compliant consumers (see my two citations above) to not find a valid description. |
Is there anyone who can merge the PR. It is correct, and it fixes the stated issue. |
@harschware I've been planning to try your patch. Hopefully, I can get around doing it sometime next week. |
@harschware You are right. The output does not conform to the specification. The TAP specification does actually describe the format clearly. Here are the relevant parts.
And:
|
zoom |
The current TAP output of BATS is incorrect TAP format for skipped tests. e.g.
bats -t fixtures/bats/skipped.bats
1..2
ok 1 # skip a skipped test
ok 2 # skip (a reason) a skipped test with a reason
The problem is that the description should precede the comment, and everything after 'skip' is the reason for skipping the test. TAP consumers then do not get the description when using this format.
Here is a screenshot (http://screencast.com/t/qpqbMbk0jFLJ) of Jenkins Tap Plugin results for the following TAP input:
1..2
ok 1 # skip for a really good reason
ok 2 skip test with a reason # skip for a really good reason
The following Gist shows what the correct format is using perl's TAP::Parser module:
https://gist.github.com/harschware/baec4c05de8e700924ad
The text was updated successfully, but these errors were encountered: