Some of the limitations of TAPx::Parser are due to how Test::Builder
works.  One thing which isn't making it into 'runtests' is the -Q
switch.  I have a -q which doesn't print test failures while tests are
running, but as you can see, one of my 'stress tests' caused a problem:

TAPx-Parser $ /usr/bin/perl -Ilib bin/runtests -qm tbad/
tbad/060-aggregator......ok 
tbad/badtests............FAILED tests 1, 2, 4, 5, 7, 8, 10, 11, 13, 14,
16, 17, 19, 20, 22, 23, 25, 26, 28, 29, 31, 32, 34, 35, 37, 38, 40, 41,
43, 44, 46, 47, 49, 50, 52, 53, 55, 56, 58, 59, 61, 62, 64, 65, 67, 68,
70, 71, 73, 74, 76, 77, 79, 80, 82, 83, 85, 86, 88, 89, 91, 92, 94, 95,
97, 98, 100
        Failed 67/100 tests, 33.00% okay
tbad/ddd.................ok 
tbad/longtestfilename....FAILED tests 3, 10
        Failed 2/10 tests, 80.00% okay (less 1 skipped test: 7 okay,
70.00%)
<snip>

There are still problems with the current TAP producer which still
shoves things into STDERR, even though I'm using an experimental '-m'
switch which merges STDERR and STDOUT.  I probably need to figure out
the IPC::Open3 solution which has been proposed, but for the time
being, I've given up on the thought of having tests completely silent
except for a summary.

TAP::Tests would not only allow us to have a clean way of getting to
TAP 2.0, but it would also allow us to include more standard test
functions and clean up bits of the current testing framework that we're
not happy with:

  use TAP::Tests tests => 3;

  ok $foo, 'foo is ok';

  if ( some_condition ) {
    skip 1;
  }
  else {
    is $this, $that, 'this == that';
  }

  throws_ok { some_func() }
    'Exception::Hissy::Fit',
    'some_func() should throw a hissy fit';

And so on.

If anyone has far more tuits than they really know what to do with, now
you know :)

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