Add Transaction

This API allows transactions to be added to the running test. The newly added transactions can be run/rerun immediately after creation or later.

Request

JSON

URL http://ip:port/shunra/api/transaction/{testId}
HTTP Method POST
HTTP Headers

Content-Type: application/json

Accept: application/json

Authorization: Basic YW5vbnltb3VzOg==

Body {"transactionName": "transaction1", "transactionDescription": "Login transaction"}

XML

URL http://ip:port/shunra/api/transaction/{testId}
HTTP Method POST
HTTP Headers

Content-Type: application/xml

Accept: application/xml

Authorization: Basic YW5vbnltb3VzOg==

Body <transactionEntityRequest> <transactionName>login</transactionName> <transactionDescription>Login transaction</transactionDescription> </transactionEntityRequest >

Response

JSON

HTTP Response Code 200 - OK
HTTP Headers

Date: Thu, 15 Mar 2014 15:36:11 GMT

Content-Type: application/json; charset=UTF-8

Accept-Ranges: bytes

HTTP Body {
id: "86dd6d8c-d1e9-4b24-b8fc-3a9355db63a3"
name: "login"
description: "Login transaction"
orderNum: 5
averageUserTime: 0
averageNetworkTime: 0
runs:
{

XML

HTTP Response Code 200 - OK
HTTP Headers

Date: Thu, 15 Mar 2014 15:36:11 GMT

Content-Type: application/xml; charset=UTF-8

Accept-Ranges: bytes

HTTP Body
<transactionEntity>
       <name>login</name>
       <description>Login transaction</description>
       <orderNum>4</orderNum>
       <averageUserTime>0.0</averageUserTime>
       <averageNetworkTime>0.0</averageNetworkTime>
       <runs />
</transactionEntity>