|
Hi,
Below is the part of code from a test FW I am working on :
sub run {
[I]my $self = shift;
$self->SUPER::LogDirGen( ); # priti
my $config = new Config::Simple( $self->{ config } );
my %config_hash = $config->vars( );
print ("1..................");
foreach ( @{ $self->{ queue } } ) {
print ("2..................");
Class::Autouse->load( $_ );
my $test_object = $_->new( \%config_hash );
my $test_name = $_;
print ("test object is : $test_object......\n");
print ("test name is : $test_name..................\n");
#$self->SUPER::LogFileGen($test_name); #priti
foreach ( grep( m/^test/, @{ Class::Inspector->methods( $_ ) } ) ) {
print ("4..................");
foreach ( 'setUp', $_, 'tearDown' ) {
print ("5..................");
eval { $test_object->$_( ) };
my $tc = $_;
print ("at the end...$tc \n");
}
}
}
}
This part of code works fine. I try to call "$self->SUPER::LogFileGen($test_name); " commented out in the above code which is a function to redirect my standard outputs to a file. I get the below error :
Can't locate TestCalenders.pm in @INC (@INC contains: C:/usr/
site/lib, C:/usr/lib, .) at C:/usr/site/lib/Automat/Framework/TestSuiteRunner.pm
line 49
Automat::Framework::TestSuiteRunner::run('Automat: :Framework::TestSuiteR
unner=HASH(0x226054)') called at run.pl line 36
# Looks like you failed 3 tests of 25.
# Looks like your test died just after 25.
Below is the sample LogFileGen subroutine:
sub LogFileGen {
my $test_object = $_[1];
print "content-type: $ext/html \n\n";
$FH = "filehandle";
chdir ("Log$now_string");
my $cur = getcwd;
open (OUTPUT, "/forum/gttest_object.txt");
my $Test = Test::Builder->new;
$Test->output("/forum/test_object.txt");
return();
}
Can anybody help to solve the issue. And also if someone please explain me why the error is coming when i cann the LogFileGen subroutine.
Thanks,
Priti
|
|
|
that code at the top really needs to be indented properly.
"Can't locate TestCalenders.pm in @INC (@INC contains: C:/usr/
site/lib, C:/usr/lib, .) at C:/usr/site/lib/Automat/Framework/TestSuiteRunner.pm
line 49"
The above text means there should be a module 'TestCalenders.pm' in any of the directories listed in @inc.
Check if the module hasn't been installed in any of the directories in @INC.
If not, it either needs to be installed in one of them or @INC needs to be expanded to include whatever path the module is in.
|
|
|
|
|
|
|
// |