Get tests by query
Description
Returns a list of tests by query (filter).
URL
/LoadTest/rest/domains/{domainName}/projects/{projectName}/tests?query={<QUERY_NAME>["<YOUR_QUERY_VALUE>"]}
Runs Query Values
QUERY_NAME options:
TsName
ID
HTTP method
GET: Returns a list of tests by query.
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:
None
Request examples:
GET http://<LRE_Server>/LoadTest/rest/domains/MyDomain/projects/MyProject/tests?query={ID[176]}
GET http://<LRE_Server>/LoadTest/rest/domains/MyDomain/projects/MyProject/tests?query={TsName[e2e_test]}
Response
Headers:
One of:
Accept: application/xml
Accept: application/json
Cookies:
None
HTML return code:
One of the HTTP return codes
HTML body:
GET: Returns the data on the entity in the response.
Response examples:
<Tests xmlns="http://www.hp.com/PC/REST/API">
<Test>
<ID>176</ID>
<Name>e2e_test</Name>
<CreatedBy>auto_user_yeqxdjbasrk</CreatedBy>
<LastModified>5/14/2024 11:56:34 AM</LastModified>
<TestFolderPath>Subject\e2e_13-05-2024-10-11-05-PM\level2\level3\level4</TestFolderPath>
</Test>
</Tests>
[
{
"ID": 176,
"Name": "e2e_test",
"CreatedBy": "auto_user_yeqxdjbasrk",
"LastModified": "5/14/2024 11:56:34 AM",
"TestFolderPath": "Subject\\e2e_13-05-2024-10-11-05-PM\\level2\\level3\\level4",
"Content": null
}
]
See also: