From Test::Simple to Test::Extreme - Bonus Material 55

When your Tests Become so big they go OO

  • Test::Class - allows you to subclass your tests

    • good for testing subclassed objects

      • Create two parallel class hierarchies: application and tests

    • for each Class in your program make a test class.

    • overkill for small test suites and non-OO programs

    • don't use unless you find yourself repeating your test code over and over to compensate for classes in your program

    • integrates with Test::Harness, Test::More, etc.

    • prerequisites: Perl 5.6.1, Storable

 

YAPC::CA << Previous | Index | Next >>
Copyright © 2003 Michael Graham