Subject: | Wish: load testclass in start() (like Test::Unit::TestRunner) |
Date: | Wed, 06 Feb 2008 19:25:23 +0100 |
To: | bug-Test-Unit-Runner-Xml [...] rt.cpan.org |
From: | Konrad Bucheli <konrad.bucheli [...] scs.ch> |
Hi there
While using Test::Unit::Runner::XML I had the problem that start()
requires a loaded testsuite.
Example with with the unittests implemented in Test1.pm, Test2.pm and
Test3.pm using Test::Unit::TestRunner:
my @testclasses = qw(Test1 Test2 Test3);
my $testrunner = Test::Unit::TestRunner->new();
foreach my $testclass(@testclasses){
$testrunner->start($testclass);
}
Then for Test::Unit::Runner::XML I need an additional line:
my @testclasses = qw(Test1 Test2 Test3);
my $testrunner = Test::Unit::Runner::XML->new('test_report');
foreach my $testclass(@testclasses){
my $suite = Test::Unit::Loader::load($testclass); #<===========
$testrunner->start($suite);
}
May this not directly be integrated into Test::Unit::Runner::XML?
Cheers
Konrad