On 07/03/07, Ovid <[EMAIL PROTECTED]> wrote:
--- Andy Armstrong <[EMAIL PROTECTED]> wrote:

> Where does TAP::Tests fit in? D'you mean as an alternative to
> Test::More or whatever?

Yes, an alternative to Test::More.  Some thoughts:

Where is it?

* Output everything to STDOUT (thereby avoiding the buffering
  problems that many experience)

Sounds like a replacement  for Test::Builder not just Test::More.

* Eliminate legacy cruft like eq_array
* Improve how SKIP is handled:

  if ( ! $alien->DOES('genocide') ) {
      skip 1, "We have morals :(";
  }
  else {
      ok $alien->kill_all_humans, 'Muhahahahah!';
  }

* Incorporate a few more standard test functions (exception tests,
  eq_or_diff, etc)
* Output TAP 2.0 (line numbers for failures, clear diagnostics, etc)
* Wash my dishes

Here's what I want from TAP 2.0

* be able to associate diagnostics with a specifc test (currently they
appear after the test by convention)

* nested blocks, each with it's own plan (or no plan)
eg
1..3
1 OK
2 1..2 # start a block
2.1 1..3 # start another block
2.1.1 OK
2.1.2 OK
2.1.3 OK
2.1 OK # inner block was all good
2.2 OK
2 OK # outer block was all good
3 1..3
3.1 OK
3.2 OK
3 NOT OK # planned for 3 but only ran 2 tests

this makes it real easy to count tests even when you do loops and
functions, so it makes almost of all the reasons for using no_plan go
away and when it doesn't it allows you to localise your no_plan to a
specific block while continuing to count all your others.

* tags, I'm not hugely keen on this but being able to provide tags is
interesting. Imagine a huge test suite where you tag eveyr test it's
dependencies. Then something breaks and you have 1000 failures in all
kinds of places, if they all have a tag in common then you have a lead
on what broke. Kinda far fetched...

F

Cheers,
Ovid

--

Buy the book -- http://www.oreilly.com/catalog/perlhks/
Perl and CGI -- http://users.easystreet.com/ovid/cgi_course/

Reply via email to