Create a test set

Description

Creates a new test set.

URL

Copy code
/LoadTest/rest/domains/{domainName}/projects/{projectName}/testsets

Remarks

The data can be passed as XML or JSON containing the equivalent data.

HTTP method

POST: Creates the test set.

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:

XML or JSON containing the name and parent ID of the test set in which to create the test instance.

ElementDescription
TestSetNameName of the test set.
TestSetParentId

ID of the test set folder. This can be taken from {project name} schema in Database > CYCL_FOLD table > CF_ITEM_ID column.

TestSetComment Comment (Optional).

Request examples:

Copy code
XML example:
POST http://<LRE_Server>/LoadTest/rest/domains/TEST_DOMAIN/projects/TEST_PROJECT/testsets 
Content-Type: application/xml
Cookie: LWSSO_COOKIE_KEY={LwssoCookie};

<TestSet xmlns="http://www.hp.com/PC/REST/API">
   <TestSetName>t1</TestSetName>
   <TestSetComment>demo test set</TestSetComment>
   <TestSetParentId>1</TestSetParentId>
</TestSet>
Copy code
JSON example:
POST http://<LRE_Server>/LoadTest/rest/domains/TEST_DOMAIN/projects/TEST_PROJECT/testsets 
Content-Type: application/json
Cookie: LWSSO_COOKIE_KEY={LwssoCookie};

{    "TestSetName": "lre_testset1",
     "TestSetComment": "demo test set",
     "TestSetParentId": 2
}

Response

Headers:

None

Cookies:

None

HTML return code:

One of the HTTP return codes

HTML body:

Response examples:

Copy code
XML example:
<TestSet xmlns="http://www.hp.com/PC/REST/API">
    <TestSetName>lre_testset</TestSetName>
    <TestSetComment>demo test set</TestSetComment>
    <TestSetParentId>1</TestSetParentId>
    <TestSetID>103</TestSetID>
</TestSet>
Copy code
JSON example:
{    "TestSetID": 104,
     "TestSetName": "lre_testset1",
     "TestSetComment": "demo test set",
     "TestSetParentId": 2
}

See also: