Start a test run
Description
Runs a test.
URL
/LoadTest/rest/domains/{domainName}/projects/{projectName}/Runs
Remarks
The ID of the test to run is in the request data. See below.
HTTP method
POST: Creates the Run resource. Creating the resource runs the test.
Request
Headers:
One of the following:
Content-Type: application/xml
Content-Type: application/json
Cookies:
Version | Cookie |
---|---|
2020 or later | LWSSO_COOKIE_KEY={LwssoCookie}; |
Earlier than 2020 | LWSSO_COOKIE_KEY={LwssoCookie};QCSession={QCSessionCookie}; |
Request body:
XML or JSON describing the requested run. The request contains the following fields.
Element | Description |
---|---|
Run | The top-level element. |
PostRunAction | One of:
|
TestID | The test ID. |
TestInstanceID | The test instance ID from OpenText Enterprise Performance Engineering in the Test Lab perspective. |
TimeslotDuration | The time to allot for the test. The minimal time that can be entered when creating a new timeslot is 30 minutes. You can set the time duration in 15 minute increments. For example, 30 minutes, 45 minutes, 1 hr, 1hr 15 minutes. |
VudsMode | If true, the test consumes Virtual User Flex Day (VUFD) licenses. |
Request examples:
POST http://<LRE_Server>/LoadTest/rest/domains/alex-qc/projects/PCdemo/Runs
Content-Type: application/xml
Cookie: LWSSO_COOKIE_KEY={LwssoCookie};
<Run xmlns="http://www.hp.com/PC/REST/API">
<PostRunAction>Collate And Analyze</PostRunAction>
<TestID>5</TestID>
<TestInstanceID>4</TestInstanceID>
<TimeslotDuration>
<Hours>1</Hours>
<Minutes>30</Minutes>
</TimeslotDuration>
<VudsMode>false</VudsMode>
</Run>
POST http://<LRE_Server>/LoadTest/rest/domains/alex-qc/projects/PCdemo/Runs
Content-Type: application/json
Cookie: LWSSO_COOKIE_KEY={LwssoCookie};
{ "PostRunAction": "Collate And Analyze",
"TestID": 176,
"TestInstanceID": 8,
"TimeslotDuration":
{
"Hours": 0,
"Minutes": 30
},
"VudsMode": false
}
Response
Headers:
One of:
Accept: application/xml
Accept: application/json
Location: { the link to the new Run entity}. This link is used in all subsequent references to the run. See the See also section below for all the resources that consume the link returned in the Location header.
Cookies:
None
HTML return code:
One of the HTTP return codes
HTML body:
The data on the new entity. See Run Status XML.
Response examples:
<Run xmlns="http://www.hp.com/PC/REST/API">
<TestID>181</TestID>
<TestInstanceID>8</TestInstanceID>
<PostRunAction>Collate And Analyze</PostRunAction>
<TimeslotID>1094</TimeslotID>
<VudsMode>false</VudsMode>
<ID>12</ID>
<Duration>0</Duration>
<RunState>Initializing</RunState>
</Run>
{
"ID": 13,
"Duration": 0,
"RunState": "Initializing",
"RunSLAStatus": null,
"TestID": 176,
"TestInstanceID": 8,
"PostRunAction": "Collate And Analyze",
"TimeslotID": 1090,
"VudsMode": false
}
See also: