Share this page

# Get test validity data

## Description

Returns diagnostics on test design.

## URL

Copy code

    /LoadTest/rest/domains/{domainName}/projects/{projectName}/tests/{ID}/validity

## Remarks

Test instances of this test are available for execution if `<IsValid>` is true in the returned data.

## HTTP method

GET: Returns the test validity data.

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

    GET http://<LRE_Server>/LoadTest/rest/domains/TEST_DOMAIN/projects/TEST_PROJECT/tests/1/validity
    Content-Type: application/xml
    Cookie: LWSSO_COOKIE_KEY={LwssoCookie};

## Response

Headers:

One of:

- Accept: application/xml

- Accept: application/json

Cookies:

None

HTML return code:

One of the HTTP return codes

HTML body:

Returns the data in XML or equivalent JSON string.

The fields in the response are as follows.

Element | Description
--- | ---
TestID | The ID.
IsValid | `true` if the test can be used.
Messages/Message | The Message `Type` attribute is one of: Type="error" Type="info"
Messages/Message | The error code.
Messages/Message/Description | The error message.

Response examples:

Copy code
XML example:

    <TestValidity xmlns="http://www.hp.com/PC/REST/API">
        <TestID>1</TestID>
        <IsValid>false</IsValid>
        <Messages>
            <Message type="error">
                <Code>0</Code>
                <Description>Percentages do not sum to 100%.</Description>
            </Message>
            <Message type="error">
                <Code>0</Code>
                <Description>Number of requested hosts (2) exceeds the number of hosts in this project's pool (1).</Description>
            </Message>
            <Message type="info">
                <Code>0</Code>
                <Description>Group g2 will not run due to 0 vusers setting</Description>
            </Message>
            <Message type="info">
                <Code>0</Code>
                <Description>Group g3 will not run due to 0 vusers setting</Description>
            </Message>
        </Messages>
    </TestValidity>

Copy code
JSON example:

    {    "TestID": 176,
         "IsValid": false,
         "Messages": [
            {
                "type": "error",
                "Code": 1752,
                "Description": "Percentages do not sum to 100%."
            },
            {
                "type": "error",
                "Code": 0,
                "Description": "Group demo_script_new must have at least one load generator"
            },
         ]
    }

See also:

- Create a test
- Test creation XML

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)