Below is the part of code from a test FW I am working on :
Expand|Select|Wrap|Line Numbers
- 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");
- }
- }
- }
- }
Expand|Select|Wrap|Line Numbers
- 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.
Expand|Select|Wrap|Line Numbers
- sub LogFileGen {
- my $test_object = $_[1];
- print "content-type: $ext/html \n\n";
- $FH = "filehandle";
- chdir ("Log$now_string");
- my $cur = getcwd;
- open (OUTPUT, ">$test_object.txt");
- my $Test = Test::Builder->new;
- $Test->output("$test_object.txt");
- return();
- }
Thanks,
Priti