Stop Transaction

Parameters:

  • transactionIdentifier: The transaction identifier, as returned by the startTranscation request.
  • transactionManagerSessionIdentifiers: Transaction session identifiers, as given during Connect.
  • Passed: Specifies if the current transaction passed or failed.

Request

Note: A new transaction cannot be started if there is already one running. If you do not have the required transactionIdentifier, use "GetAllTransactions" API above to get all transactions in the test and concatenate the relevant transaction "id" value with the last runid to get the transactionIdentifier.

JSON

URL http://ip:port/shunra/api/transactionmanager/transaction/{transactionManagerSessionIdentifier}/{transactionIdentifier}
HTTP Method PUT
HTTP Headers

Content-Type: application/json

Accept: application/json

Authorization: See Web Services Authentication.

Body
{"passed":"true"}

XML

URL http://ip:port/shunra/api/transactionmanager/transaction/{transactionManagerSessionIdentifier}/{transactionIdentifier}
HTTP Method PUT
HTTP Headers

Content-Type: application/xml

Accept: application/xml

Authorization: See Web Services Authentication.

Body
<stopTransactionRequest>
<passed>true</passed>
</stopTransactionRequest>                    

Response

JSON

HTTP Response Code 200 - OK
HTTP Headers  
HTTP Body
{
    transactionIdentifier: "e16645fa-6f96-4707-b884-fe46b872e3a436434aa6-ae80-4ace-8009-8ee8c970e689"
    transactionEntity: {
        id: "e16645fa-6f96-4707-b884-fe46b872e3a4"
        name: "transaction1"
        description: "Login transaction"
        averageUserTime: 0
        averageNetworkTime: 0
        orderNum: 0
        runs: {
            36434 aa6 - ae80 - 4 ace - 8009 - 8e e8c970e689: {
                id: "36434aa6-ae80-4ace-8009-8ee8c970e689"
                startTime: 1382461475606
                endTime: 0
                userTime: 0
                networkTime: 0
                status: "Start"
                averageBandwith: 0
                totalThroughputClient: 0
                totalThroughputServer: 0
                aggregateScore: 0
                numberOfErrors: 0
                applicationTurns: 0
                protocolOverhead: 0
                passed: true
            }
        }
    }
}

XML

HTTP Response Code 200 - OK
HTTP Headers

 

HTTP Body
<transactionResponse>
   <transactionIdentifier>e444e1f1-f55f-480a-9de9-ae587e16a0a1e9204852-6e3d-4416-b952-e8f7a67ff250</transactionIdentifier>
   <transactionEntity>
      <name>transaction1</name>
      <description>Login transaction</description>
      <orderNum>1</orderNum>
      <networkScenario>3G</networkScenario>
      <averageUserTime>836228.0</averageUserTime>
      <averageNetworkTime>0.0</averageNetworkTime>
      <runs>
         <entry>
            <key>4e5f487c-dcb2-454d-9215-ec38fd641a46</key>
            <value>
               <startTime>1382108358565</startTime>
               <endTime>1382109194793</endTime>
               <userTime>0.0</userTime>
               <networkTime>0.0</networkTime>
               <status>Stop</status>
               <networkScenario>3G</networkScenario>
               <averageBandwith>0.0</averageBandwith>
               <totalThroughputClient>0</totalThroughputClient>
               <totalThroughputServer>0</totalThroughputServer>
               <aggregateScore>0.0</aggregateScore>
               <numberOfErrors>0</numberOfErrors>
               <applicationTurns>0</applicationTurns>
               <protocolOverhead>0</protocolOverhead>
               <id>4e5f487c-dcb2-454d-9215-ec38fd641a46</id>
            </value>
         </entry>
      </runs>
      <id>e444e1f1-f55f-480a-9de9-ae587e16a0a1</id>
   </transactionEntity>
</transactionResponse>