Stories
Slash Boxes
Comments
NOTE: use Perl; is on undef hiatus. You can read content, but you can't post it. More info will be forthcoming forthcomingly.

All the Perl that's Practical to Extract and Report

use Perl Log In

Log In

[ Create a new account ]

Ovid (2709)

Ovid
  (email not shown publicly)
http://publius-ovidius.livejournal.com/
AOL IM: ovidperl (Add Buddy, Send Message)

Stuff with the Perl Foundation. A couple of patches in the Perl core. A few CPAN modules. That about sums it up.

Journal of Ovid (2709)

Tuesday July 29, 2008
10:05 AM

$builder-start_todo

[ #37046 ]

One of our test frameworks at the BBC has difficulties using TODO testing due to the declarative nature of the tests being written in YAML. There is now a patch in RT which allows us fine-grained control over TODO tests. It basically lets us do things like this:

  my $builder = Test::Builder->new;

  foreach my $test_case ($framework->cases) {
      if ( my $message = $test_case->todo ) {
          $builder->start_todo($message);
          $test_case->run;
          $builder->end_todo;
      }
      else {
          $test_case->run;
      }
  }

Going through our test framework and wrapping every possible test in an optional TODO is rather problematic, but trying to use a fully-qualified $TODO package variable (as documented in Test::Builder) is equally problematic as there are many packages, not all of which we know in advance. This allows us easily to mark as 'TODO' entire test cases.

We're implementing this today because lack of a feature like this is causing us much grief.

(As a needed side-effect, you can now nest TODO tests with this syntax).

The Fine Print: The following comments are owned by whoever posted them. We are not responsible for them in any way.
 Full
 Abbreviated
 Hidden
More | Login | Reply
Loading... please wait.