Test Suite APIs
Get All Test Suite Fields
GET /api/v3/projects/{projectId}/settings/test-suites/fields
qTest version: 6+
Description: To get all active Test Suite's fields.
Path variable:
-
projectId: ID of the project
Request sample:
GET /api/v3/projects/14921/settings/test-suites/fields HTTP/1.1
Host: nephele.qTestnet.com
Content-Type: application/json
Authorization: --
Cache-Control: no-cache
Response sample:
[
{
"links": [
{
"rel": "self",
"href": "https://nephele.qTestnet.com/api/v3/projects/14921/-67"
}
],
"id": -67,
"attribute_type": "Date",
"label": "Planned Start Date",
"required": false,
"constrained": false,
"order": 1,
"multiple": false,
"data_type": 4,
"searchable": false,
"free_text_search": false,
"system_field": true,
"original_name": "PlannedStartDateTestSuite",
"is_active": true
},
{
"links": [
{
"rel": "self",
"href": "https://nephele.qTestnet.com/api/v3/projects/14921/-69"
}
],
"id": -69,
"attribute_type": "Date",
"label": "Planned End Date",
"required": false,
"constrained": false,
"order": 2,
"multiple": false,
"data_type": 4,
"searchable": false,
"free_text_search": false,
"system_field": true,
"original_name": "PlannedEndDateTestSuite",
"is_active": true
},
...
Get A Test Suite By Its ID
GET /api/v3/projects/{projectId}/test-suites/{testSuiteId}
qTest version: 6+
Description: To retrieve a test suite's details using its ID.
Path variable:
-
projectId: ID of the project
-
testSuiteId: ID of the test suite which you want to retrieve
Request sample:
GET /tc/api/v3/projects/45/test-suites/138 HTTP/1.1
Host: nephele.qTestnet.com
Content-Type: application/json
Authorization: --
Cache-Control: no-cache
Response sample:
{
"links": [
{
"rel": "self",
"href": "https://nephele.qTestnet.com/api/v3/projects/14921/test-suites/188492"
},
{
"rel": "release",
"href": "https://nephele.qTestnet.com/api/v3/projects/14921/releases/61162"
},
{
"rel": "parent-test-cycle",
"href": "https://nephele.qTestnet.com/api/v3/projects/14921/test-cycles/125024"
},
{
"rel": "test-runs",
"href": "https://nephele.qTestnet.com/api/v3/projects/14921/test-runs?parentId=188492&parentType=test-suite"
}
],
"id": 188492,
"name": "Suite 2.1",
"order": 1,
"pid": "TS-1",
"properties": [
{
"field_id": -67,
"field_value": "2015-07-27T10:55:24+00:00"
},
{
"field_id": -69,
"field_value": "2015-07-27T10:55:24+00:00"
},
{
"field_id": -74,
"field_value": "-61162"
},
{
"field_id": -65
},
{
"field_id": -68,
"field_value": "[5500]"
},
{
"field_id": -71,
"field_value": "501"
},
{
"field_id": -70,
"field_value": ""
}
],
"web_url": "https://nephele.qTestnet.com/p/14921/portal/project#tab=testexecution&object=2&id=188492"
}
Get Test Suites - Deprecated
GET /api/v3/projects/{projectId}/test-suites?releaseId={releaseId}&testCycleId={testCycleId}
qTest version: Deprecated from version 6.
Description: To get all the Test Suites under the root node. If the request parameters are specified, it returns all the Test Suites under the specific Release/Test Cycles.
Path variable:
-
projectId: ID of the project
Request parameter:
| Parameter | Required | Description |
|---|---|---|
| releaseId | false | Get test suites of the release |
| testCycleId | false | Get test suites of the test cycles |
Request sample:
GET /api/v3/projects/2/test-suites
Host: localhost:8080
Authorization: bmVwaGVsZXxpbnZpdGV1c2VyQHlvcG1haWwuY29
tOjE0Mjg5MTA1NDE0NzU6MGY1MDI0NmY3NmI3ZTZhM2NmM2Y3OTI1ZjViZmIzNzE
Cache-Control: no-cache
Content-Type: application/x-www-form-urlencoded
Response sample:
[
{
"links": [
{
"rel": "self",
"href": "http://localhost:8080/api/v3/projects/2/test-suites/3"
},
{
"rel": "test-runs",
"href": "http://localhost:8080/api/v3/projects/2/test-runs?testSuiteId=3&testCycleId&releaseId"
}
],
"id": 3,
"name": "Untitled",
"order": 2
}
]
Get All Test Suites Under Root
GET /api/v3/projects/{projectId}/test-suites
GET /api/v3/projects/{projectId}/test-suites?parentId=0&parentType=root
qTest version: 6+
Description: To retrieve all test suites located under root
Path variable:
-
projectId: ID of the project
Request Parameter:
| Parameter | Required | Description |
|---|---|---|
| parentId | no | Input 0 (zero) to get Test Suites directly under root. |
| parentType | no | Input root to get Test Suites directly under root. |
Get All Test Suites Under A Specific Release
GET /api/v3/projects/{projectId}/test-suites?parentId={releaseId}&parentType=release
qTest version: 6+
Description: To retrieve all test suites under a specific release. The ID of the Release is specified in the request parameter.
Path Variable:
-
projectId: ID of the project
Request Parameter:
| Parameter | Required | Description |
|---|---|---|
| parentId | yes | Specify the Release ID. |
| parentType | yes | Input release |
Get All Test Suites Under A Specific Test Cycle
GET /api/v3/projects/{projectId}/test-suites?parentId={parentCycleId}&parentType=test-cycle
qTest version: 6+
Description: To retrieve all test suites under a specific parent test cycle. The ID of the parent test cycle is specified in the request parameter.
Path Variable:
-
projectId: ID of the project
Request Parameter:
| Parameter | Required | Description |
|---|---|---|
| parentId | yes | Specify the parent test cycle ID. |
| parentType | yes | Input test-cycle |
Request sample:
GET /api/v3/projects/14921/test-suites?parentId=125024&parentType=test-cycle HTTP/1.1
Host: nephele.qTestnet.com
Content-Type: application/json
Authorization: --
Cache-Control: no-cache
Response sample:
[
{
"links": [
{
"rel": "self",
"href": "https://nephele.qTestnet.com/api/v3/projects/14921/test-suites/188492"
},
{
"rel": "release",
"href": "https://nephele.qTestnet.com/api/v3/projects/14921/releases/61162"
},
{
"rel": "parent-test-cycle",
"href": "https://nephele.qTestnet.com/api/v3/projects/14921/test-cycles/125024"
},
{
"rel": "test-runs",
"href": "https://nephele.qTestnet.com/api/v3/projects/14921/test-runs?parentId=188492&parentType=test-suite"
}
],
"id": 188492,
"name": "Suite 2.1",
"order": 1,
"pid": "TS-1",
"properties": [
{
"field_id": -67,
"field_value": "2015-07-27T10:55:24+00:00"
},
{
"field_id": -69,
"field_value": "2015-07-27T10:55:24+00:00"
},
{
"field_id": -74,
"field_value": "-61162"
},
{
"field_id": -65
},
{
"field_id": -68,
"field_value": "[5500]"
},
{
"field_id": -71,
"field_value": "501"
},
{
"field_id": -70,
"field_value": ""
}
],
"web_url": "https://nephele.qTestnet.com/p/14921/portal/project#tab=testexecution&object=2&id=188492"
}
]
Create A Test Suite Under Root
POST /api/v3/projects/{projectId}/test-suites
POST /api/v3/projects/{projectId}/test-suites?parentId=0&parentType=root
qTest version: 6+
Description: To create a new test suite directly located under root.
Path Variable:
-
projectId: ID of the project
Request Parameter:
| Parameter | Required | Description |
|---|---|---|
| parentId | no | Input 0 (zero) to create a test suite directly under root. |
| parentType | no | Input root to create a test suite directly under root. |
Request sample:
POST /api/v3/projects/14921/test-suites HTTP/1.1
Host: nephele.qTestnet.com
Content-Type: application/json
Authorization: --
Cache-Control: no-cache
{ "name": "Create test-suite under root", "properties": [ { "field_id": -70, "field_value": "2016-05-07T12:00:00+00:00" }, { "field_id": -72, "field_value": "2016-09-30T12:00:00+00:00" }, { "field_id": -77, "field_value": "-115181" }, { "field_id": 1613204, "field_value": "28321" }, { "field_id": -71, "field_value": "[3754]" }, { "field_id": -74, "field_value": "502" }, { "field_id": -73, "field_value": "description" }, { "field_id": 1613205, "field_value": " Text box ts" }, { "field_id": 1613207, "field_value": "Text area ts" }, { "field_id": 1613209, "field_value": "1" }, { "field_id": 1613211, "field_value": "2016-09-30T12:00:00+00:00" }, { "field_id": 1613213, "field_value": "34629" }, { "field_id": 1613215, "field_value": "rich text editor" }, { "field_id": 1613217, "field_value": "123.0" }, { "field_id": 1613219, "field_value": "[1, 4]" }, { "field_id": 1613221, "field_value": "2016-09-29T19:45:00+00:00" }, { "field_id": 1613223, "field_value": "https://pro.qTestnet.com/p/30645/portal/project#tab=testexecution&object=2&id=436018" }, { "field_id": 1613225, "field_value": "[1, 3]" } ] }
Response sample:
{ "links": [ { "rel": "self", "href": "https://annatrinhvu.qTestnet.com/api/v3/projects/31215/test-suites/570440" }, { "rel": "release", "href": "https://annatrinhvu.qTestnet.com/api/v3/projects/31215/releases/117111" }, { "rel": "parent-test-cycle", "href": "https://annatrinhvu.qTestnet.com/api/v3/projects/31215/test-cycles/307153" }, { "rel": "test-runs", "href": "https://annatrinhvu.qTestnet.com/api/v3/projects/31215/test-runs?parentId=570440&parentType=test-suite" } ], "id": 570440, "name": "Create Test Suite under root", "order": 1, "pid": "TS-64", "properties": [ { "field_id": -70, "field_value": "2015-10-22T17:00:00+00:00" }, { "field_id": -72, "field_value": "2015-10-24T17:00:00+00:00" }, { "field_id": -77, "field_value": "-117111" }, { "field_id": 1741507 }, { "field_id": -71, "field_value": "[1029]" }, { "field_id": 1891099, "field_value": "501" }, { "field_id": -73, "field_value": "" }, { "field_id": 1736800 } ], "web_url": "https://annatrinhvu.qTestnet.com/p/31215/portal/project#tab=testexecution&object=2&id=570440" } Create a Test Suite Under A Specific Release">
Create A Test Suite Under A Specific Release
POST /api/v3/projects/{projectId}/test-suites?parentId={releaseId}&parentType=release
qTest version: 6+
Description: To create a test suite under a specific release. The ID of the Release is specified in the request parameter.
In the request body, you can only specify a valid target Build under the specified release. If not, it will be skipped.
Path variable:
-
projectId: ID of the project
Request Parameter:
| Parameter | Required | Description |
|---|---|---|
| parentId | yes | Specify the Release ID. |
| parentType | yes | Input release |
Request sample:
POST /api/v3/projects/14921/test-suites?parentId=61162&parentType=Release HTTP/1.1
Host: nephele.qTestnet.com
Content-Type: application/json
Authorization: --
Cache-Control: no-cache
{ "name": "Create test-suite under a release", "properties": [ { "field_id": -70, "field_value": "2016-05-07T12:00:00+00:00" }, { "field_id": -72, "field_value": "2016-09-30T12:00:00+00:00" }, { "field_id": -77, "field_value": "-115181" }, { "field_id": 1613204, "field_value": "28321" }, { "field_id": -71, "field_value": "[3754]" }, { "field_id": -74, "field_value": "502" }, { "field_id": -73, "field_value": "description" }, { "field_id": 1613205, "field_value": " Text box ts" }, { "field_id": 1613207, "field_value": "Text area ts" }, { "field_id": 1613209, "field_value": "1" }, { "field_id": 1613211, "field_value": "2016-09-30T12:00:00+00:00" }, { "field_id": 1613213, "field_value": "34629" }, { "field_id": 1613215, "field_value": "rich text editor" }, { "field_id": 1613217, "field_value": "123.0" }, { "field_id": 1613219, "field_value": "[1, 4]" }, { "field_id": 1613221, "field_value": "2016-09-29T19:45:00+00:00" }, { "field_id": 1613223, "field_value": "https://pro.qTestnet.com/p/30645/portal/project#tab=testexecution&object=2&id=436018" }, { "field_id": 1613225, "field_value": "[1, 3]" } ] }
Response sample:
{ "links": [ { "rel": "self", "href": "https://annatrinhvu.qTestnet.com/api/v3/projects/31215/test-suites/570440" }, { "rel": "release", "href": "https://annatrinhvu.qTestnet.com/api/v3/projects/31215/releases/117111" }, { "rel": "parent-test-cycle", "href": "https://annatrinhvu.qTestnet.com/api/v3/projects/31215/test-cycles/307153" }, { "rel": "test-runs", "href": "https://annatrinhvu.qTestnet.com/api/v3/projects/31215/test-runs?parentId=570440&parentType=test-suite" } ], "id": 570440, "name": "Create a Test Suite Under a Release", "order": 1, "pid": "TS-64", "properties": [ { "field_id": -70, "field_value": "2015-10-22T17:00:00+00:00" }, { "field_id": -72, "field_value": "2015-10-24T17:00:00+00:00" }, { "field_id": -77, "field_value": "-117111" }, { "field_id": 1741507 }, { "field_id": -71, "field_value": "[1029]" }, { "field_id": 1891099, "field_value": "501" }, { "field_id": -73, "field_value": "" }, { "field_id": 1736800 } ], "web_url": "https://annatrinhvu.qTestnet.com/p/31215/portal/project#tab=testexecution&object=2&id=570440" }Create a Test Suite Under A Specific Release">
Create A Test Suite Under A Specific Cycle
POST /api/v3/projects/{projectId}/test-suites?parentId={testCycleId}&parentType=test-cycle
qTest version: 6+
Description: To create a test suite under a specific test cycle. The ID of the parent test cycle is specified in the request parameter.
If the parent test cycle's target Build has been set: In the request body, you can only specify the same target Build with the parent test cycle. If not, it will be skipped.
If the parent test cycle's target Release has been set and target Build has not been set: In the request body, you can only specify a valid target Build under the specified release. If not, it will be skipped.
Path Variable:
-
projectId: ID of the project
Request Parameter:
| Parameter | Required | Description |
|---|---|---|
| parentId | yes | Specify the parent test cycle ID. |
| parentType | yes | Input test-cycle |
Request sample:
POST /api/v3/projects/14921/test-suites?parentId=125024&parentType=test-cycle HTTP/1.1
Host: nephele.qTestnet.com
Content-Type: application/json
Authorization: --
Cache-Control: no-cache
{ "name": "Create test-suite under a cycle", "properties": [ { "field_id": -70, "field_value": "2016-05-07T12:00:00+00:00" }, { "field_id": -72, "field_value": "2016-09-30T12:00:00+00:00" }, { "field_id": -77, "field_value": "-115181" }, { "field_id": 1613204, "field_value": "28321" }, { "field_id": -71, "field_value": "[3754]" }, { "field_id": -74, "field_value": "502" }, { "field_id": -73, "field_value": "description" }, { "field_id": 1613205, "field_value": " Text box ts" }, { "field_id": 1613207, "field_value": "Text area ts" }, { "field_id": 1613209, "field_value": "1" }, { "field_id": 1613211, "field_value": "2016-09-30T12:00:00+00:00" }, { "field_id": 1613213, "field_value": "34629" }, { "field_id": 1613215, "field_value": "rich text editor" }, { "field_id": 1613217, "field_value": "123.0" }, { "field_id": 1613219, "field_value": "[1, 4]" }, { "field_id": 1613221, "field_value": "2016-09-29T19:45:00+00:00" }, { "field_id": 1613223, "field_value": "https://pro.qTestnet.com/p/30645/portal/project#tab=testexecution&object=2&id=436018" }, { "field_id": 1613225, "field_value": "[1, 3]" } ] }
Response sample:
{ "links": [ { "rel": "self", "href": "https://annatrinhvu.qTestnet.com/api/v3/projects/31215/test-suites/570440" }, { "rel": "release", "href": "https://annatrinhvu.qTestnet.com/api/v3/projects/31215/releases/117111" }, { "rel": "parent-test-cycle", "href": "https://annatrinhvu.qTestnet.com/api/v3/projects/31215/test-cycles/307153" }, { "rel": "test-runs", "href": "https://annatrinhvu.qTestnet.com/api/v3/projects/31215/test-runs?parentId=570440&parentType=test-suite" } ], "id": 570440, "name": "Create a Test Suite Under a Cycle", "order": 1, "pid": "TS-64", "properties": [ { "field_id": -70, "field_value": "2015-10-22T17:00:00+00:00" }, { "field_id": -72, "field_value": "2015-10-24T17:00:00+00:00" }, { "field_id": -77, "field_value": "-117111" }, { "field_id": 1741507 }, { "field_id": -71, "field_value": "[1029]" }, { "field_id": 1891099, "field_value": "501" }, { "field_id": -73, "field_value": "" }, { "field_id": 1736800 } ], "web_url": "https://annatrinhvu.qTestnet.com/p/31215/portal/project#tab=testexecution&object=2&id=570440" }Create a Test Suite Under a Specific Release">
Update A Test Suite Or Move It To Other Container
PUT /api/v3/projects/{projectId}/test-suites/{testSuiteId}
qTest version: 6+
Description: To update an existing test suite. You can utilize this API to move the test suite to other container.
Path Variable:
-
projectId: ID of the project
-
testSuiteId: ID of the test suite which needs to be updated
Request Parameter: Use these parameters in case you want to move the test suite to other container.
If you use the request parameters, the request body will be ignore. That means the test suite is being moved but it will not be updated with the properties specify in the request body.
| Parameter | Required | Description |
|---|---|---|
| parentId | yes | Input 0 (zero) to move the test suite to under root. Specify a Release ID to move the test suite to that release. Specify a parent test cycle ID to move the test suite to that parent test cycle. |
| parentType | yes | Input root in case you are moving the test suite to under root. Input Release in case you are moving the test suite to under a release. Input test-cycle in case you are moving the test suite to under a parent test cycle. |
Request sample:
PUT /api/v3/projects/14921/test-suites/188720?parentId=125024&parentType=test-cycle HTTP/1.1
Host: nephele.qTestnet.com
Content-Type: application/json
Authorization: --
Cache-Control: no-cache
{ "name": "Move test suite to cycle" }
Response sample:
{
"links": [
{
"rel": "self",
"href": "https://nephele.qTestnet.com/api/v3/projects/14921/test-suites/188720"
},
{
"rel": "release",
"href": "https://nephele.qTestnet.com/api/v3/projects/14921/releases/61162"
},
{
"rel": "parent-test-cycle",
"href": "https://nephele.qTestnet.com/api/v3/projects/14921/test-cycles/125024"
},
{
"rel": "test-runs",
"href": "https://nephele.qTestnet.com/api/v3/projects/14921/test-runs?parentId=188720&parentType=test-suite"
}
],
"id": 188720,
"name": "Create test suite under root",
"order": 1,
"pid": "TS-2",
"properties": [
{
"field_id": -67,
"field_value": "2015-07-26T17:00:00+00:00"
},
{
"field_id": -69,
"field_value": "2015-07-26T17:00:00+00:00"
},
{
"field_id": -74,
"field_value": "-61162"
},
{
"field_id": -65
},
{
"field_id": -68,
"field_value": "[3754]"
},
{
"field_id": -71,
"field_value": "501"
},
{
"field_id": -70,
"field_value": ""
}
],
"web_url": "https://nephele.qTestnet.com/p/14921/portal/project#tab=testexecution&object=2&id=188720"
}
Delete A Test Suite
qTest version: 6+
Description: To delete a test suite
Path variable:
-
projectId: ID of the project
-
testSuiteId: ID of the test suite which needs to be updated