KWPro.net

Test::Unit.pm unit testing framework
By: conark
Published On: 9-27-2005

this is a nice, little framework that you can use for building either OOP or scripted tests. the basics: use Test::Unit::Procedural; create_suite(); run_suite(); sub test_comparison { $a = 1; $b = 1; $c = 2; print "$a == $b\n"; assert($a == $b); print "$b == $c\n"; assert($b == $c\n"; } this will create a test suite based on subroutines you define here. the most important elements are the "assert" function calls which test for boolean cases. if a test fails, the script will die. i like this because it does exactly what you need and can be used to test in bulk large numbers of things like data objects, etc.

Tags: perl
AddThis Social Bookmark Button Sphere: Related Content

Trackbacks: (Trackback URL)

No Comments Posted Yet
July [August] September
Sun Mon Tue Wed Thu Fri Sat
31 1 2 3 4 5 6
7 8 9 10 11 12 13
14 15 16 17 18 19 20
21 22 23 24 25 26 27
28 29 30 31 1 2 3