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 2020 (or later)

LWSSO_COOKIE_KEY={LwssoCookie};

Versions earlier than 2020

LWSSO_COOKIE_KEY={LwssoCookie};QCSession={QCSessionCookie};

Request Body:

None

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:

ElementDescription
TestIDThe ID.
IsValidtrue if the test can be used.
Messages/Message

The Message Type attribute is one of:

  • Type="error"
  • Type="info"
Messages/MessageThe error code.
Messages/Message/DescriptionThe 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