develooper Front page | perl.qa | Postings from January 2008

Re: Halting on first test failure

Thread Previous | Thread Next
From:
Ovid
Date:
January 11, 2008 14:20
Subject:
Re: Halting on first test failure
Message ID:
782605.92093.qm@web60823.mail.yahoo.com
--- Andy Armstrong <andy@hexten.net> wrote:

> HARNESS_BAIL_ON_FAIL => Stop the whole run on the first failure
> 
> And perhaps for completeness:
> 
> HARNESS_SKIP_ON_FAIL => Stop the failing test program on first
> failure

Remember that neither of those can really stop the test program from
running.  The first could halt *subsequent* test programs from running
and the second could merely discard subsequent test results from a
given TAP stream.

So imagine you have a Web spider with 1000 tests and it fails at the
third test.  If the behavior is in the harness, it stops processing
results but the test program keeps running unless you deliberately try
to kill the process.  I think it's much cleaner that the thing which
generates the test output knows when to stop.

I'm willing to be convinced otherwise, though.

Cheers,
Ovid

--
Buy the book  - http://www.oreilly.com/catalog/perlhks/
Perl and CGI  - http://users.easystreet.com/ovid/cgi_course/
Personal blog - http://publius-ovidius.livejournal.com/
Tech blog     - http://use.perl.org/~Ovid/journal/

Thread Previous | Thread Next


nntp.perl.org: Perl Programming lists via nntp and http.
Comments to Ask Bjørn Hansen at ask@perl.org | Group listing | About