Open jonhoo opened 9 years ago
I've achieved something like this result with a naming scheme for tests:
@test "root layout: contains ." { ... }
@test "root layout: contains .." { ... }
@test "root layout: contains etc" { ... }
@test "root manipulation: can add file as root" { ... }
@test "root manipulation: ..." { ... }
But yes, your way would be better -- easier both to write and to read.
:+1:
The TAP format already has support for subtests. It is achieved by writing out a new test plan, and indenting it and the subtest results with four spaces.
I haven't been able to find it in the TAP13 spec yet, but at least Perl outputs it: https://metacpan.org/pod/Test::More#Module-tests and scroll up (or search for subtest) .. and Jenkins TAP plugin can consume it. https://wiki.jenkins-ci.org/display/JENKINS/TAP+Plugin
It would be useful to have the ability to further structure the tests beyond just single tests. For example, if each test file could be given a "suite" title, we could get test output like:
Personally I'd like to be able to nest tests further (maybe by being able to load a test file with sub-tests inside a
@test
), but even a single level of nesting would be useful.