Adrian forgot to send this to the list. -------- Original Message -------- Subject: Re: Do we need subtests in TAP? Date: Wed, 26 Oct 2011 14:14:31 +0100 From: Adrian Howard <adrianh@quietstars.com> To: Michael G Schwern <schwern@pobox.com> Hey there, On 26 Oct 2011, at 04:56, Michael G Schwern wrote: > I understand wanting "blocks of tests" and the ability to make plans for just those blocks, but do we need a discrete test state for that? For example, Test::Class provides most of what subtests provide without special support. ... and to do that T::C contains a bunch of annoying special case code than is (I think) still wrong in an odd corner case. Everybody who wants to do the things T::C does will also have to do that work. T::C implemented with subtests is _much_ cleaner code. There may be other ways of getting that complexity out of T::C (and similar) and into Test::Builder of course - but I'm not 100% sure what you're suggesting... > It occurred to me because most other testing systems don't have subtests. > They have test methods, but those aren't treated as a sub-state of the test. Some do have different levels of hierarchy though. (e.g. JUnit's Test Case / Suite distinction). > In essence, a "subtest" is nothing more than a block of tests with a name and it's own plan. The special TAP formatting seems unnecessary. I guess that's the real question, do we need the special TAP formatting or do we just need named test blocks with their own plan? One thing subtests TAP formatting gives you is a simple way to nest TAP streams from elsewhere. Any other system would mean you have to rewrite the nested stream (I think?) Cheers, Adrian -- Who invented the eponym?Thread Previous | Thread Next