Warming up to Modular Testing with Test::Class

Warming up to Modular Testing with Test::Class

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.


Attended by: Robert Boone (‎rlb3‎), Dean Serenevy (‎duelafn‎), Adam Foxson (‎Fhoxh‎), Timothy Appnel (‎tima‎), Erik Sturcke, John Anderson (‎genehack‎), Nathaniel Smith (‎Nate‎), David Faler, Mark Jubenville (‎ioncache‎), Olaf Alders (‎oalders‎), Jeremy Fluhmann (‎jfluhmann‎), Leonard Miller (‎olegm‎), Christopher Nielsen (‎sparc‎), Geoffrey Darling (‎Geoff‎), Sean McCune (‎pghcoder‎), Chris Muench (‎blasto333‎), Kenneth Power, Clinton Wolfe, Liam Echlin, Jason Crome (‎CromeDome‎), Lisa Wilcox, Ricardo Signes (‎rjbs‎), James E Keenan (‎kid51‎), Nova Patch (‎patch‎), Doug Bell (‎preaction‎), Brad Oaks (‎bradoaks‎), Trey Harris,