Beefy Boxes and Bandwidth Generously Provided by pair Networks
We don't bite newbies here... much
 
PerlMonks  

Re: Automated regression testing

by radiantmatrix (Parson)
on Oct 13, 2006 at 15:15 UTC ( [id://578156]=note: print w/replies, xml ) Need Help??


in reply to Automated regression testing

Test scripts intended for the Test::Harness framework can be talked into handling all of what you require; they are, after all, just Perl programs.

Basically, you're looking at using Conditional tests like Test::More supports. It works like this:

SKIP: { skip $num_tests, "Wasn't able to start the 'foo' daemon" if ( try_start('/bin/foo') or wait_for('Please start foo', '5m'); ); # ... the tests that depend on foo }

If you need to bail out completely, you can use the BAIL_OUT method provided by Test::More:

eval { try_start('/bin/foo') or wait_for('Please start foo', '5m'); die "Unable to find a running foo" unless is_running('/bin/foo'); }; if ($@) { BAIL_OUT($@); }

Please note that these are pretty high-level suggestions, but I hope they can start you thinking in the right direction.

<radiant.matrix>
A collection of thoughts and links from the minds of geeks
The Code that can be seen is not the true Code
I haven't found a problem yet that can't be solved by a well-placed trebuchet

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others chilling in the Monastery: (8)
As of 2024-06-19 10:00 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found

    Notices?
    erzuuli‥ 🛈The London Perl and Raku Workshop takes place on 26th Oct 2024. If your company depends on Perl, please consider sponsoring and/or attending.