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

LOG PATH $TestLogPath$ 
LOG FILE $TestLogFile$

// Read in basic settings

call c:\httptest\integration\settings 

// URL

DEFINE wapTestURL "http://$wapTest$/"
DEFINE PutURL01   "http://$wapTest$/upload/pic01.jpg"
DEFINE PutURL02   "http://$wapTest$/upload/pic02.jpg"
DEFINE PutURL03   "http://$wapTest$/upload/pic03.jpg"
DEFINE PutURL04   "http://$wapTest$/upload/pic04.jpg"
DEFINE PutFile01  "c:\httptest\integration\small_pic01.jpg"
DEFINE PutFile02  "c:\httptest\integration\small_pic02.jpg"
DEFINE PutFile03  "c:\httptest\integration\small_pic03.jpg"
DEFINE PutFile04  "c:\httptest\integration\small_pic04.jpg"

// Header 

DEFINE Accept "*/*"
DEFINE ContentType "*/*" 

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

CASE HTTP-I-2355 Transport framework (HTTP) with max number of concurrent methods 

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

CONNECT HTTP H_CON_01

TRANSACTION  T_01 H_CON_01 PUT $PutURL01$ $PutFile01$
TRANSACTION  T_02 H_CON_01 PUT $PutURL02$ $PutFile02$
TRANSACTION  T_03 H_CON_01 PUT $PutURL03$ $PutFile03$
TRANSACTION  T_04 H_CON_01 PUT $PutURL04$ $PutFile04$
    
// ---------------------------------------------------------
// display all connectons     

connect

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

transaction

//---------------------------------------------------------
//
// the test has been started, the test harness will now wait 
// for 120 seconds to allow for data transfer to completed 
//
//---------------------------------------------------------

hold 120 

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

define

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

showtrans 

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


IF $T_01LastEvent$ == $Succeeded$

   IF $T_01HttpStatus$ == $HTTP_OK$

      PRINT Result: HTTP-I-2355 Put Passed      
   ELSE 
      PRINT Result: HTTP-I-2355 Put Failed, HTTP Status $T_01HttpStatus$    
   ENDIF    
ELSE 
   PRINT Result: HTTP-I-2355 Put Failed, last event $T_01LastEvent$ 
ENDIF

endtrans T_01 

IF $T_02LastEvent$ == $Succeeded$

   IF $T_02HttpStatus$ == $HTTP_OK$

      PRINT Result: HTTP-I-2355 Put Passed      
   ELSE 
      PRINT Result: HTTP-I-2355 Put Failed, HTTP Status $T_02HttpStatus$    
   ENDIF    
ELSE 
   PRINT Result: HTTP-I-2355 Put Failed, last event $T_02LastEvent$ 
ENDIF

endtrans T_02

IF $T_03LastEvent$ == $Succeeded$

   IF $T_03HttpStatus$ == $HTTP_OK$

      PRINT Result: HTTP-I-2355 Put Passed      
   ELSE 
      PRINT Result: HTTP-I-2355 Put Failed, HTTP Status $T_03HttpStatus$    
   ENDIF    
ELSE 
   PRINT Result: HTTP-I-2355 Put Failed, last event $T_03LastEvent$ 
ENDIF

endtrans T_03 

IF $T_04LastEvent$ == $Succeeded$

   IF $T_04HttpStatus$ == $HTTP_OK$

      PRINT Result: HTTP-I-2355 Put Passed      
   ELSE 
      PRINT Result: HTTP-I-2355 Put Failed, HTTP Status $T_04HttpStatus$    
   ENDIF    
ELSE 
   PRINT Result: HTTP-I-2355 Put Failed, last event $T_04LastEvent$ 
ENDIF

endtrans T_04

// --------------------------------------------------------
// display connections 

connect

DISCONNECT H_CON_01

// --------------------------------------------------------
// display connections, after close 

connect

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

END CASE HTTP-I-2355

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

END LOG

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