Things I Want In Tests

Ovid on 2007-11-19T11:30:25

  • I want Test::Builder to support the new YAML diagnostic syntax.
  • I want deferred plans. So that I can specify my own plan count at the end of a test run, but not just use 'no_plan'.
  • I want test counts to each test program can start with [233/340] so you can see your test suite progress.
  • I want pre- and post- test program hooks (we already have pre- and post- test suite hooks)

The beauty of my wish list is that I can make those last two happen.


Yeah baby!

AndyArmstrong on 2007-11-19T13:32:16

I want Test::Builder to support the new YAML diagnostic syntax.

I've done a really nasty hacky, bodge of Test::More that sort of supports diagnostics:

Test::More::Diagnostic

It highlights what I believe is a small design flaw in the YAML blocks: if you want to process a test result and its associated block as an atom you have to introduce a delay into the processing pipeline - because having seen a test you don't know if the next thing is going to be a YAML block or another test.

TAP::Formatter::TextMate has sample code for associating diagnostics with the correct test result.

I want deferred plans. So that I can specify my own plan count at the end of a test run, but not just use 'no_plan'.

I think that structured TAP solves that problem. So we need people to vote on one of:

http://testanything.org/wiki/index.php/Test_Groups http://testanything.org/wiki/index.php/Test_Blocks

so we can move forward with that.

Pre and post hooks?

Alias on 2007-11-20T01:08:52

You mean like

#!/usr/bin/perl

use strict;
use MyTestLibrary 'prehook';
use Test::More tests => 1234;

(tests)

END {
        MyTestLibrary->posthook;
}

Re:Pre and post hooks?

Ovid on 2007-11-20T09:22:53

Exactly, just not embedded in the tests.