DEFINE TestLogPath "c:\logs\http_integ\"
DEFINE TestLogFile "HTTP-I-2310.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-2310 Basic Methods using Transport framework (HTTP) over Specified bearer  

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

// Select the specified bearer 1 from the current commdb 

DEFINE IAP 1 

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 60 seconds to allow for data transfer to 
// completed 
//---------------------------------------------------------

hold 60

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

define

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

showtrans 

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

IF $T_01LastEvent$ == $Succeeded$

   IF $T_01HttpStatus$ == $HTTP_OK$

      PRINT TEST HTTP-I-2310 Get Passed      
   ELSE 
      PRINT TEST HTTP-I-2310 Get Failed, HTTP Status $T_01HttpStatus$   
   ENDIF    
ELSE 
   PRINT TEST HTTP-I-2310 Get Failed, last event $T_01LastEvent$ 
ENDIF

endtrans T_01 

IF $T_02LastEvent$ == $Succeeded$

   IF $T_02HttpStatus$ == $HTTP_OK$
            
      PRINT TEST HTTP-I-2310 Get Passed 
   ELSE 
      PRINT TEST HTTP-I-2310 Get Failed, HTTP Status $T_02HttpStatus$    
   ENDIF
ELSE 
   PRINT TEST HTTP-I-2310 Get 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-2310

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

END LOG

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