Share this page

# Get tests by query

## Description

Returns a list of tests by query (filter).

## URL

Copy code

    /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:

Copy code
XML example - Get tests with a specific test ID:

    GET http://<LRE_Server>/LoadTest/rest/domains/MyDomain/projects/MyProject/tests?query={ID[176]}

Copy code
XML example - Get tests with a specific test name (TsName):

    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:

Copy code
XML example:

    <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>

Copy code
JSON example:

    [
        {
            "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:

- Create a test
- Test entity XML
- Return, delete, or update a test by test ID

Tips to improve your search results... OpenText™ Enterprise Performance Engineering API Reference OpenText™ Enterprise Performance Engineering All View Local Help Center View Online Help Center(Undefined variable: _rscC_Basic_Variables.VersionLabel)