Create new instance in test set
Available in versions: 12.56 and later
Description
Adds a test instance to a test set based on the specified test.
URL
/LoadTest/rest/domains/{domainName}/projects/{projectName}/testInstances
Remarks
The data can be passed as XML or JSON containing the equivalent data.
HTTP Method
POST: Creates the test instance in the test set.
Request
Headers:
One of the following:
Content-Type: application/xml
Content-Type: application/json
Cookies:
Version 2020 (or later) | LWSSO_COOKIE_KEY={LwssoCookie}; |
Versions earlier than 2020 | LWSSO_COOKIE_KEY={LwssoCookie};QCSession={QCSessionCookie}; |
Request Body:
XML or JSON containing the test ID and the ID of test set in which to create the test instance.
POST http://<LRE_Server>/LoadTest/rest/domains/TEST_DOMAIN/projects/TEST_PROJECT/testInstances
Content-Type: application/xml
Cookie: LWSSO_COOKIE_KEY={LwssoCookie};
<TestInstance xmlns="http://www.hp.com/PC/REST/API">
<TestID>6</TestID>
<TestSetID>1</TestSetID>
</TestInstance>
POST http://<LRE_Server>/LoadTest/rest/domains/TEST_DOMAIN/projects/TEST_PROJECT/testInstances
Content-Type: application/json
Cookie: LWSSO_COOKIE_KEY={LwssoCookie};
{ "TestID": 178,
"TestSetID": 102
}
Response
Headers:
One of:
Accept: application/xml
Accept: application/json
Cookies:
None
HTML Return Code:
One of the HTTP Return Codes
HTML Body:
The test ID, the test set ID, and the ID of the new test instance.
See Also