By Brad Oaks (bradoaks) from Raleigh.pm
Date: Tuesday, June 23, 2009 04:15 PM
Duration: 20 minutes
Target audience: Intermediate
Language:
Tags: test::class testing
You can find more information on the speaker's site:
This talk will help you get started arranging your tests into modules. We'll cover setting up a simple TAP::Harness to run your tests. Then we'll see how Plus Three has used Test::Class to divide up and reuse code in our test suite.
Separating tests out from a large .t file into modules and subroutines has helped me confirm more quickly that a code change has not introduced a regression. Developers save time by only running the relevant subset of tests before committing a change to the code or a change to the tests themselves.
I'll offer a few tips on checking preconditions in your testing environment (e.g. is a daemon running, is an external service url reachable) and
either bailing out gracefully or trying to remedy the situation.
You can ease into this modularization adventure. With Test::Class your shinier new tests can work right beside the venerable dustier ones letting you rework them as they need it.