DEFINE TestLogPath    "c:\logs\http_integ\"
DEFINE TestLogFile    "HTTP-I-2300.log"

LOG PATH $TestLogPath$
LOG FILE $TestLogFile$

// Read in basic settings

call c:\httptest\integration\settings 

//---------------------------------------------------------
//  set up required definitions

// URL

DEFINE wapTestURL "http://$wapTest$"
DEFINE dfURL      "http://$wapTest$/perl/dumpform.pl" 
DEFINE dfFile     "c:\httptest\integration\dumpform.txt" 

// Header 

DEFINE Accept "text/plain, image/gif"
DEFINE AcceptEncoding "gzip, compress"
DEFINE ContentType "text/html" 

//---------------------------------------------------------
//  start of test case

CASE HTTP-I-2300 Basic Methods using Transport framework (HTTP) over Default bearer  

//---------------------------------------------------------

CONNECT HTTP H_CON_01

TRANSACTION T_01 H_CON_01 GET $wapTestURL$
// TRANSACTION T_02 H_CON_01 POST $dfURL$ $dfFile$ 

// ---------------------------------------------------------
// display all connectons     

connect

// ---------------------------------------------------------
// display all transactions 

transaction

//---------------------------------------------------------
// the transactions have been started, the test harness will 
// now wait for a set number of seconds to allow for data 
// transfer to completed i.e. the default is 40 for NTRas 
// otherwise the first arguemnt is used, 200 is recommended  
//---------------------------------------------------------

hold 40 

// --------------------------------------------------------
// display status 

define

// --------------------------------------------------------
// display active transactions 

showtrans 

// --------------------------------------------------------
// report results 

IF $T_01LastEvent$ == $Succeeded$

   IF $T_01HttpStatus$ == $HTTP_OK$

      PRINT Result: HTTP-I-2300 GET $wapTestURL$ Passed      
   ELSE 
      PRINT Result: HTTP-I-2300 GET $wapTestURL$ Failed, HTTP Status $T_01HttpStatus$   
   ENDIF    
ELSE 
   PRINT Result: HTTP-I-2300 GET $wapTestURL$ Failed, last event $T_01LastEvent$ 
ENDIF

endtrans T_01 

IF $T_02LastEvent$ == $Succeeded$

   IF $T_02HttpStatus$ == $HTTP_OK$
            
      PRINT Result: HTTP-I-2300 POST $dfURL$ Passed 
   ELSE 
      PRINT Result: HTTP-I-2300 POST $dfURL$ Failed, HTTP Status $T_02HttpStatus$    
   ENDIF
ELSE 
   PRINT Result: HTTP-I-2300 POST $dfURL$ Failed, last event $T_02LastEvent$  
ENDIF

endtrans T_02 

// --------------------------------------------------------
// close connections 

DISCONNECT H_CON_01

// display state of connections, after close 

connect

//---------------------------------------------------------
//  end the test case

END CASE HTTP-I-2300

//---------------------------------------------------------
//  close the log file

END LOG

//---------------------------------------------------------
//	end of test
//---------------------------------------------------------
