[Perlunit-users] using Test::Unit::Setup
Status: Beta
Brought to you by:
mca1001
From: Steven H. <msh...@gm...> - 2006-06-21 17:42:22
|
Greetings, Is there an example usage of Test::Unit::Setup someone could refer me to? I'm afraid I might be using it the wrong way. Here is how I've got it in a sample setup: ----------------------------------- package MITestSuite; use base qw(Test::Unit::Setup Test::Unit::TestSuite); sub name{ 'MITestSuite'}; sub include_tests{ qw( SiteMgrTestSuite PubSysTestSuite ); } ------------------------------------ This outputs: Suite setup E Time: 0 wallclock secs ( 0.00 usr + 0.00 sys = 0.00 CPU) !!!FAILURES!!! Test Results: Run: 0, Failures: 0, Errors: 1 There was 1 error: Use of uninitialized value in string at /home/shilton/shared/my_perl/lib/Test/Unit/Decorator.pm line 30. Use of uninitialized value in string at /home/shilton/shared/my_perl/lib/Test/Unit/Decorator.pm line 30. 1) /home/shilton/shared/my_perl/lib/Test/Unit/Decorator.pm:15 - Can't call method "run" on an undefined value Can't locate object method "annotations" via package "MITestSuite" at /home/shilton/shared/my_perl/lib/Test/Unit/TestRunner.pm line 107. I see that the set_up() method is being called successfully, but it's dying on line 15 because $self->{_fTest} is undefined, and it looks like it's not being innited in the new() method, because the param used to populate _fTest is not passed in all the way up the stack. Am I using Test::Unit::Setup incorrectly? P.S. I've tried a number of different 'use base()' param lists. Each had different behavior, but none what I was looking for. Thanks for any help. -- Steven Hilton <msh...@gm...> <http://mshiltonj.com/> "It is the duty of the patriot to protect his country from its government." -- Thomas Paine |