Hi,
Below is the part of code from a test FW I am working on :
[CODE=perl]sub run {
[I]my $self = shift;
$self->SUPER::LogDirG en( ); # 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::LogFile Gen($test_name) ; #priti
foreach ( grep( m/^test/, @{ Class::Inspecto r->methods( $_ ) } ) ) {
print ("4............ ......");
foreach ( 'setUp', $_, 'tearDown' ) {
print ("5............ ......");
eval { $test_object->$_( ) };
my $tc = $_;
print ("at the end...$tc \n");
}
}
}
}[/CODE]
This part of code works fine. I try to call "$self->SUPER::LogFile Gen($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 :
Below is the sample LogFileGen subroutine:
[CODE=perl]sub LogFileGen {
my $test_object = $_[1];
print "content-type: $ext/html \n\n";
$FH = "filehandle ";
chdir ("Log$now_strin g");
my $cur = getcwd;
open (OUTPUT, ">$test_object. txt");
my $Test = Test::Builder->new;
$Test->output("$test_ object.txt");
return();
}[/CODE]
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
Below is the part of code from a test FW I am working on :
[CODE=perl]sub run {
[I]my $self = shift;
$self->SUPER::LogDirG en( ); # 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::LogFile Gen($test_name) ; #priti
foreach ( grep( m/^test/, @{ Class::Inspecto r->methods( $_ ) } ) ) {
print ("4............ ......");
foreach ( 'setUp', $_, 'tearDown' ) {
print ("5............ ......");
eval { $test_object->$_( ) };
my $tc = $_;
print ("at the end...$tc \n");
}
}
}
}[/CODE]
This part of code works fine. I try to call "$self->SUPER::LogFile Gen($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 :
Code:
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.
[CODE=perl]sub LogFileGen {
my $test_object = $_[1];
print "content-type: $ext/html \n\n";
$FH = "filehandle ";
chdir ("Log$now_strin g");
my $cur = getcwd;
open (OUTPUT, ">$test_object. txt");
my $Test = Test::Builder->new;
$Test->output("$test_ object.txt");
return();
}[/CODE]
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
Comment