Beefy Boxes and Bandwidth Generously Provided by pair Networks
Welcome to the Monastery
 
PerlMonks  

Re: Quiet test runner

by tomhukins (Curate)
on Sep 21, 2005 at 15:22 UTC ( #493839=note: print w/ replies, xml ) Need Help??


in reply to Quiet test runner

I find this really useful, thanks. I'm using it as a consequence of the sitation I described in Reporting test failures within cron.

I noticed it doesn't work quite right if I run an incorrect number of tests. For example:

use Test::More tests => 3; ok 1, 'Happy'; ok 1, 'Cheerful';

We expect three tests but only run two, which both succeed. Fortunately, is_expected deals with this, but unfortunately show_details doesn't report the failure. The altered is_expected_test_result below fixes this reporting problem:

sub is_expected_test_result { my $test_result = shift; return $test_result->{ok} && ! is_unexpected_todo_success( $test_result ) && ! diagnostics( $_ ); }

I discovered this when running some Test::WWW::Mechanize tests against a server that stops responding, causing later tests not to run.


Comment on Re: Quiet test runner
Select or Download Code
Re^2: Quiet test runner
by adrianh (Chancellor) on Sep 22, 2005 at 07:49 UTC

    Well spotted. Thanks.

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://493839]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others contemplating the Monastery: (4)
As of 2015-07-06 00:39 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    The top three priorities of my open tasks are (in descending order of likelihood to be worked on) ...









    Results (68 votes), past polls