[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Setting up test in bb-services



Hi,
	I've been duplicating a number of the tests that we ran in Big
Brother through external scripts in the bb-services config file. 
One of these old perl test files opened up a telnet session and navigates
through some menus to confirm the application is running. 

The application is crap and needs to pause between each command otherwise
the session remains open. Is there a way to pause for a length of time as
this app doesn't seem to cache the commands?
Here is what I've been trying test with in the bb-services.

[rft]
  send "\r\n 6 \r\n"
  options banner,telnet
  port 23    

This is the simplest way to get in an out of the app. I've included my perl
script that tests our RFT servers at the moment

#!/usr/local/bin/perl
use IO::Socket;
my $sock = IO::Socket::INET->new(       PeerAddr => @ARGV,
                                        PeerPort =>'23' );
if ($sock)
{       #print "Opened @ARGV\n";
        my $line = <$sock>;
        print $sock "\015";
        print $sock "\012";
        sleep 1;
        print $sock "6";
        sleep 1;
        print $sock "\015";
        print $sock "\012";

exit 0;}
else
{ print "not opened @ARGV\n";
exit 1;
}
close($sock);


Alun