Slash Boxes
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 ]

hex (3272)

  (email not shown publicly)

Perl, RDF and wiki hacker, London, UK. This is my former Perl blog; I now write at Earle's Notebook [].

Journal of hex (3272)

Monday June 25, 2007
06:55 AM

Skipping tests not relevant to users

[ #33598 ]
Mainly a note for my own later usage...

Test-driven development is great, but it comes with the overhead of all the prerequisites required by the testing libraries. So you may wish not to run all of your tests by default when the end-user installs your module.

Pete Sergeant (sheriff on IRC) suggests using an environment variable for doing this:

plan skip_all => 'set DEVELOPER_TESTS to enable these tests' unless $ENV{DEVELOPER_TESTS};

Claes suggested:

eval "use Test::Something::VeryDetailed"; plan skip_all => "..." if $@;

So I would probably merge the two.

  eval "use Test::Pod::Coverage";
  plan skip_all => "..." if $@;
} else {
  plan skip_all => 'set DEVELOPER_TESTS to enable these tests'

This way you could save having to include all the developer testing modules in the Makefile.PL.

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