codetoad.com
  ASP Shopping CartForum & BBS
  - all for $20 from CodeToad Plus!
  
  Home || ASP | ASP.Net | C++/C# | DHTML | HTML | Java | Javascript | Perl | VB | XML || CodeToad Plus! || Forums || RAM 
Search Site:
Search Forums:
  Subroutine call  pagarwalla at 17:29 on Monday, March 10, 2008
 

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


  Re: Subroutine call  mimir at 22:49 on Monday, March 10, 2008
 

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.










CodeToad Experts

Can't find the answer?
Our Site experts are answering questions for free in the CodeToad forums
//








Recent Forum Threads
•  Re: Subroutine call
•  Re: sort hash by value, numerically
•  Pls suggest a FreeTextBox that works in IE,Mozilla & safari
•  how to read an ascii format file
•  CrossCheck a browserless framework for testing Javascript
•  should i use a multidimensional array???
•  Re: Doubt regarding CoreJava
•  Constructor parameters
•  Help with Easy Prog


Recent Articles
ASP GetTempName
Decode and Encode UTF-8
ASP GetFile
ASP FolderExists
ASP FileExists
ASP OpenTextFile
ASP FilesystemObject
ASP CreateFolder
ASP CreateTextFile
Javascript Get Selected Text


© Copyright codetoad.com 2001-2008