Add run to trend report and get data by ID
Description
Adds a run to an existing trend report, and returns the report metadata (per the specified trend report ID).
URL
/LoadTest/rest/domains/{domainName}/projects/{projectName}/TrendReports/{ID}
Remarks
Only runs in the Finished state can be added.
To get the report data, request TrendReports/{ID}/data.
HTTP method
POST: Adds a run to a trend report.
GET: Returns the report metadata in the body of the response.
Request
Headers:
One of the following:
Content-Type: application/xml
Content-Type: application/json
Content-Length: {length}
Host: {PCServer}
Cookies:
Version | Cookie |
---|---|
2020 or later | LWSSO_COOKIE_KEY={LwssoCookie}; |
Earlier than 2020 | LWSSO_COOKIE_KEY={LwssoCookie};QCSession={QCSessionCookie}; |
Request body:
GET: No request body.
POST: An XML or JSON describing the run. The fields in the request are listed below.
Element Description TrendReport The root element. Project The project to which the run belongs. The project can be different than the project of the report. TestSetId The ID of the test set that contains the executed test. TestId The Test ID. RunId The Run ID. TrendedRanged (Optional) The range of the run to add to the report.
Default: If the performance test is defined with a trend range and an action to be taken when the maximum number of runs has been reached, this will be taken into consideration; otherwise it will be the entire run.
Request examples:
POST /LoadTest/rest/domains/{domainName}/projects/{projectName}/TrendReports/{ID} HTTP/1.1
Content-Type: application/xml
Cookie: LWSSO_COOKIE_KEY={LwssoCookie};
Host: <LRE_Server>
Content-Length: 203
Expect: 100-continue
<TrendReport xmlns="http://www.hp.com/PC/REST/API">
<Project>PC</Project>
<RunId>2</RunId>
<TestSetId>5</TestSetId>
</TrendReport>
<TrendReport xmlns="http://www.hp.com/PC/REST/API">
<Project>PC</Project>
<TestSetId>1</TestSetId>
<TestId>2</TestId>
<RunId>4</RunId>
<TrendedRange>
<StartTime>
<Hours>1</Hours>
<Minutes>0</Minutes>
<Seconds>0</Seconds>
</StartTime>
<EndTime>
<Hours>2</Hours>
<Minutes>0</Minutes>
<Seconds>0</Seconds>
</EndTime>
</TrendedRange>
</TrendReport>
POST /LoadTest/rest/domains/{domainName}/projects/{projectName}/TrendReports/{ID} HTTP/1.1
Content-Type: application/json
Cookie: LWSSO_COOKIE_KEY={LwssoCookie};
Host: <LRE_Server>
Content-Length: 203
Expect: 100-continue
{ "Project": "{{project}}",
"TestSetId": 8,
"TestId": 176,
"RunId": 13
}
Response
Headers:
None
Cookies:
None
HTML return code:
One of the HTTP return codes
Upon success, returns HTTP status 200 (OK).
HTML body:
The XML containing the trend report metadata. See TrendReports/{ID} XML.
Upon success, the response will contain the following information:
HTTP/1.1 200 OK Cache-Control: no-cache Pragma: no-cache Expires: -1 Date: Sun, 29 Nov 2023 13:40:44 GMT Content-Length: 0
See also: