SKIPing multiple tests

From Test Anything Protocol

Jump to: navigation, search

TAP allows us to skip all tests

1..0 # Skipped: WWW::Mechanize not installed

or an individual test

 ok 23 # skip Insufficient flogiston pressure

but doesn't allow us to skip a set of contiguous tests without repeating the # skip line each time.

This seems wasteful, and lacks the ability to definitely say that the tests were skipped for the same reason (rather than just two reasons that happen to have the same bit of descriptive text).

Maybe something like.

ok 1
ok 2..1233 # skip Insufficient flogiston pressure
ok 1234

or

 ok 1
 2..1233 # Skipped: WWW::Mechanize not installed
 ok 1234

Contents

[edit] Status

This is a TAP proposal and has not been accepted.

[edit] For

[edit] Against

[edit] Discussion

The Test Blocks proposal offers an alternative solution: a begin / end block can be skipped in its entirety:

 1..2
 begin 1 Generic tests
   1..4
   ok 1 aligned
   ok 2 locked
   ok 3 loaded
   not ok 4 bang
 end
 begin 2 Win32 specific tests
   1..0 # Skipped: not running on Windows
 end
Personal tools