Skip Menu |

This queue is for tickets about the Test-Unit-Runner-Xml CPAN distribution.

Report information
The Basics
Id: 26964
Status: open
Priority: 0/
Queue: Test-Unit-Runner-Xml

People
Owner: Nobody in particular
Requestors: ammar1310 [...] hotmail.com
Cc:
AdminCc:

Bug Information
Severity: (no value)
Broken in: (no value)
Fixed in: (no value)



Subject: Compatibility with Test::Unit v 0.25
Date: Mon, 7 May 2007 15:44:44 +0000
To: <bug-test-unit-runner-xml [...] rt.cpan.org>
From: Ammar Hasan <ammar1310 [...] hotmail.com>
Test Runner XML is not working Environment: Windows XP/ Active Perl 5.8.8/ Test::Unit version 0.25 All I am using are sample commands from both distributions and i am wondering if the Runner::XML volunteers have smoke tested it with current versions of Test::Unit and Active perl stated above. I inserted the sample run script from Test::Unit::Runner::XML v 0.01 into sample TestRunner.pl from Test::Unit version 0.25 but the runner gave me this error: ==============TestRunner.pl============================= #!/usr/bin/perl -w use strict; use Test::Unit::Debug qw(debug_pkgs);use Test::Unit::TestRunner; # Uncomment and edit to debug individual packages.#debug_pkgs(qw/Test::Unit::TestCase/); #my $testrunner = Test::Unit::TestRunner->new();#$testrunner->start(@ARGV); use Test::Unit::Runner::XML; mkdir("test_reports");my $runner = Test::Unit::Runner::XML->new("test-reports");$runner->start(@ARGV);exit(!$runner->all_tests_passed()); ========================================================== =============Command Line Command========================== C:\Documents and Settings\ahasan\Desktop\Test-Unit-0.25>perl -w -I./t/tlib TestRunner.pl AllTestsCan't locate object method "run" via package "AllTests" (perhaps you forgot to load "AllTests"?) at C:/Perl/site/lib/Test/Unit/Runner/XML.pm line 39. =========================================================== Show quoted text
_________________________________________________________________ Connect to the next generation of MSN Messenger  http://imagine-msn.com/messenger/launch80/default.aspx?locale=en-us&source=wlmailtagline
From: andrew.och [...] hp.com
In Test::Unit::Runner::XML change the "start" subroutine to "do_run", then cut and paste a new start subroutine taken from Test::Unit::TestRunner as follows: sub start { my $self = shift; my (@args) = @_; my $test = ""; my $wait = 0; for (my $i = 0; $i < @args; $i++) { if ($args[$i] eq "-wait") { $wait = 1; } elsif ($args[$i] eq "-v") { print Test::Unit::COPYRIGHT_SHORT; } else { $test = $args[$i]; } } if ($test eq "") { die "Usage: XMLTestRunner.pl [-wait] name, where name is the name of the Test class\n"; } my $suite = Test::Unit::Loader::load($test); $self->do_run($suite, $wait); } This makes Test::Unit::Runner::XML behave just like Test::Unit::TestRunner and should solve the bug.