Warming up to Modular Testing (YAPC::NA::2009)
by bradoaks on Jun 27, 2009
- 2,033 views
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 an...
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.
Accessibility
Categories
Upload Details
Uploaded via SlideShare as OpenOffice
Usage Rights
© All Rights Reserved
Statistics
- Favorites
- 0
- Downloads
- 16
- Comments
- 0
- Embed Views
- Views on SlideShare
- 2,027
- Total Views
- 2,033