develooper Front page | perl.qa | Postings from October 2011

Re: Do we need subtests in TAP?

Thread Previous | Thread Next
From:
Michael G Schwern
Date:
October 31, 2011 20:07
Subject:
Re: Do we need subtests in TAP?
Message ID:
4EAF625F.8000007@pobox.com
On 2011.10.30 11:15 PM, Eric Wilhelm wrote:
> # from Michael G Schwern
> # on Sunday 30 October 2011 20:30:
> 
>> The current Test::Builder implementation is a mess and its design
>> cannot go forward.  They have to be gotten just right to ensure that
>> not just nested TAP is supported, but nesting in other formats.  Or
>> if those formats don't have nesting, then linearizing the subtests in
>> those formats.  And event watcher (ie. plugins) authors have to be
>> shielded from the complexity.
> 
> Maybe have a null or default handler for the subtests -- possibly 
> allowing authors to use a base class or role which gives them a 
> subtest_start() returning the null handler and subtest_end() which just 
> forwards the summary as a single test event.
> 
> Is there a second format being implemented to test this API?

There's five.  TAP v13, POSIX, Null, PlusMinus and SimpleHTML. [1] [2]  Of
them all, TAP is the one that's most fleshed out.  POSIX has proven most
useful as a disparate format.

I would love to see a formatter for Jenkins/JUnit, [3] that would probably be
the most useful and interesting.  I'd also love to see one that just spat out
events as a list of JSON objects [4], useful both for debugging and as a
lossless format for communicating to a harness.


[1]
https://github.com/schwern/test-more/tree/Test-Builder1.5/lib/Test/Builder2/Formatter
[2]
https://github.com/schwern/test-more/blob/Test-Builder1.5/examples/TB2/lib/TB2/Formatter/SimpleHTML.pm
[3] https://github.com/schwern/test-more/issues/158
[4] https://github.com/schwern/test-more/issues/159

-- 
24. Must not tell any officer that I am smarter than they are, especially
    if it's true.
    -- The 213 Things Skippy Is No Longer Allowed To Do In The U.S. Army
           http://skippyslist.com/list/

Thread Previous | Thread Next


nntp.perl.org: Perl Programming lists via nntp and http.
Comments to Ask Bjørn Hansen at ask@perl.org | Group listing | About