7 Test Cycle APIs

Get A Test Cycle By Its ID
Get Test Cycles - Deprecated
Get All Test Cycles Directly Under Root
Get All Test Cycles Under A Specific Release
Get All Test Cycles Under A Specific Test Cycle
Create A Test Cycle Under Root
Create A Test Cycle Under A Specific Release
Create A Test Cycle Under A Specific Test Cycle
Update A Test Cycle Or Move It To Other Container
Delete A Test Cycle

Get A Test Cycle By Its ID

GET /api/v3/projects/{projectId}/test-cycles/{testCycleId}

qTest version: 6+

Description: To retrieve a test cycle's details using its ID.

Path variable:

  • projectId: ID of the project
  • testCycleId: ID of the test cycle which you want to retrieve

Request Parameter:

Parameter Required Description
expand no If you specify expand=descendants, the response will also include its children and grand children test cycles/suites.

Request sample:

GET /test-conductor/api/v3/projects/1/test-cycles/81?expand=descendants HTTP/1.1
Host: localhost:8080
Content-Type: application/json
Authorization: --
Cache-Control: no-cache

Response sample:

{
  "links": [
    {
      "rel": "test-suites",
      "href": "http://localhost:8080/test-conductorapi/v3/projects/1/test-suites?parentId=81&parentType=test-cycle"
    },
    {
      "rel": "test-runs",
      "href": "http://localhost:8080/test-conductor/api/v3/projects/1/test-runs?parentId=81&parentType=test-cycle"
    }
  ],
  "id": 81,
  "name": "Test Cycle 8.1",
  "order": 0,
  "pid": "CL-81",
  "web_url": "https://localhost:8443/test-conductor/p/1/portal/project#tab=testexecution&object=4&id=81",
  "description": "Create test-cycle to root level"
}

Get Test Cycles - Deprecated

GET /api/v3/projects/{projectId}/test-cycles?releaseId={releaseId}

qTest version: Deprecated from version 6

Description: To get all the Test Cycle under the root node. If the request parameter is specified, it returns all the Test Cycles in that specific release.

Path variable:

  • projectId: ID of the project

Request parameter:

Parameter Required Description
releaseId false Get test cycles of the release

Request sample:

 GET /api/v3/projects/2/test-cycles  
 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-cycles/1"  
       },  
       {  
         "rel": "test-suites",  
         "href": "http://localhost:8080/api/v3/projects/2/test-suites?releaseId&testCycleId=1"  
       },  
       {  
         "rel": "test-runs",  
         "href": "http://localhost:8080/api/v3/projects/2/test-runs?testSuiteId&testCycleId=1&releaseId"  
       }  
     ],  
     "id": 1,  
     "name": "Untitled",  
     "order": 1  
   }  
 ]  

Get All Test Cycles Directly Under Root

GET /api/v3/projects/{projectId}/test-cycles/

GET /api/v3/projects/{projectId}/test-cycles?parentId=0&parentType=root

qTest version: 6+

Description: To retrieve all test cycles directly located under root.

Path variable:

  • projectId: ID of the project

Request Parameter:

Parameter Required Description
parentId no Input 0 (zero) to get Test Cycles directly under root.
parentType no Input root to get Test Cycles directly under root.
expand no Specify expand=descendants to retrieve the test cycle's children and grand children test cycles/suites.

Get All Test Cycles Under A Specific Release

GET /api/v3/projects/{projectId}/test-cycles?parentId={releaseId}&parentType=release

qTest version: 6+

Description: To retrieve all test cycles 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
expand no Specify expand=descendants to retrieve the test cycle's children and grand children test cycles/suites.

Get All Test Cycles Under A Specific Test Cycle

GET /api/v3/projects/{projectId}/test-cycles?parentId={parentCycleId}&parentType=test-cycle

qTest version: 6+

Description: To retrieve all test cycles under a specific parent test cycle. The ID of the parent release 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
expand no Specify expand=descendants to retrieve the test cycle's children and grand children test cycles/suites.

Request sample:

GET /api/v3/projects/1/test-cycles/?parentType=test-cycle&parentId=118431 HTTP/1.1
Host: nephele.qtestnet.com
Content-Type: application/json
Authorization: --
Cache-Control: no-cache

Response sample:

[
  {
    "links": [
      {
        "rel": "release",
        "href": "https://nephele.qtestnet.com/api/v3/projects/1/releases/56401"
      },
      {
        "rel": "parent-test-cycle",
        "href": "https://nephele.qtestnet.com/api/v3/projects/1/test-cycles/118431"
      },
      {
        "rel": "test-suites",
        "href": "https://nephele.qtestnet.com/api/v3/projects/1/test-suites?parentId=119927&parentType=test-cycle"
      },
      {
        "rel": "test-runs",
        "href": "https://nephele.qtestnet.com/api/v3/projects/1/test-runs?parentId=119927&parentType=test-cycle"
      }
    ],
    "id": 119927,
    "name": "Firefox",
    "order": 109453,
    "pid": "CL-7098",
    "web_url": "https://nephele.qtestnet.com/p/1/portal/project#tab=testexecution&object=4&id=119927"
  },
  {
    "links": [
      {
        "rel": "release",
        "href": "https://nephele.qtestnet.com/api/v3/projects/1/releases/56401"
      },
      {
        "rel": "parent-test-cycle",
        "href": "https://nephele.qtestnet.com/api/v3/projects/1/test-cycles/118431"
      },
      {
        "rel": "test-suites",
        "href": "https://nephele.qtestnet.com/api/v3/projects/1/test-suites?parentId=119928&parentType=test-cycle"
      },
      {
        "rel": "test-runs",
        "href": "https://nephele.qtestnet.com/api/v3/projects/1/test-runs?parentId=119928&parentType=test-cycle"
      }
    ],
    "id": 119928,
    "name": "Chrome",
    "order": 109454,
    "pid": "CL-7099",
    "web_url": "https://nephele.qtestnet.com/p/1/portal/project#tab=testexecution&object=4&id=119928"
  }
]

Create A Test Cycle Under Root

POST /api/v3/projects/{projectId}/test-cycles

POST /api/v3/projects/{projectId}/test-cycles?parentId=0&parentType=root

qTest version: 6+

Description: To create a new test cycle directly located under root.

Path variable:

  • projectId: ID of the project

Request sample:

POST /api/v3/projects/14921/test-cycles HTTP/1.1
Host: nephele.qtestnet.com
Content-Type: application/json
Authorization: --
Cache-Control: no-cache

{
  "name": "Create test cycle to root level",
  "description": "Create test cycle to root level"
}

Response sample:

{
    "links": [
        {
            "rel": "test-suites",
            "href": "https://nephele.qtestnet.com/api/v3/projects/14921/test-suites?parentId=125018&parentType=test-cycle"
        },
        {
            "rel": "test-runs",
            "href": "https://nephele.qtestnet.com/api/v3/projects/14921/test-runs?parentId=125018&parentType=test-cycle"
        }
    ],
    "id": 125018,
    "name": "Create test cycle to root",
    "order": 5,
    "pid": "CL-18",
    "web_url": "https://nephele.qtestnet.com/p/14921/portal/project#tab=testexecution&object=4&id=125018",
    "description": "Create test cycle to root level"
}

Create A Test Cycle Under A Specific Release

POST /api/v3/projects/{projectId}/test-cycles?parentId={releaseId}&parentType=release

qTest version: 6+

Description: To create a test cycle under a specific release. The ID of the release is specified in the request parameter.

button-round-warning-icon.pngHINT: 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-cycles?parentId=61162&parentType=release HTTP/1.1
Host: nephele.qtestnet.com
Content-Type: application/json
Authorization: --
Cache-Control: no-cache

{
  "name": "Cycle 2",
  "description": "Create test-cycle to release"
  "target_build_id": "174061"
}

Response sample:

{
    "links": [
        {
            "rel": "release",
            "href": "https://nephele.qtestnet.com/api/v3/projects/14921/releases/61162"
        },
        {
            "rel": "test-suites",
            "href": "https://nephele.qtestnet.com/api/v3/projects/14921/test-suites?parentId=125024&parentType=test-cycle"
        },
        {
            "rel": "test-runs",
            "href": "https://nephele.qtestnet.com/api/v3/projects/14921/test-runs?parentId=125024&parentType=test-cycle"
        }
    ],
    "id": 125024,
    "name": "Cycle 2",
    "order": 0,
    "pid": "CL-20",
    "web_url": "https://nephele.qtestnet.com/p/14921/portal/project#tab=testexecution&object=4&id=125024",
    "description": "Create test-cycle to release"
}

Create A Test Cycle Under A Specific Test Cycle

POST /api/v3/projects/{projectId}/test-cycles?parentId={testCycleId}&parentType=test-cycle

qTest version: 6+

Description: To create a test cycle under a specific test cycle. The ID of the parent test cycle is specified in the request parameter.

button-round-warning-icon.pngHINT:

  • 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-cycles?parentId=125024&parentType=test-cycle HTTP/1.1
Host: nephele.qtestnet.com
Content-Type: application/json
Authorization: --
Cache-Control: no-cache

{
  "name": "Create test-cycle to test-cycle",
  "description": "Create test-cycle to test-cycle"
}

Response sample:

{
    "links": [
        {
            "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-suites",
            "href": "https://nephele.qtestnet.com/api/v3/projects/14921/test-suites?parentId=125027&parentType=test-cycle"
        },
        {
            "rel": "test-runs",
            "href": "https://nephele.qtestnet.com/api/v3/projects/14921/test-runs?parentId=125027&parentType=test-cycle"
        }
    ],
    "id": 125027,
    "name": "Create test-cycle to test-cycle",
    "order": 0,
    "pid": "CL-4",
    "web_url": "https://nephele.qtestnet.com/p/14921/portal/project#tab=testexecution&object=4&id=125027",
    "description": "Create test-cycle to test-cycle"
}

Update A Test Cycle Or Move It To Other Container

PUT /api/v3/projects/{projectId}/test-cycles/{testCycleId}

qTest version: 6+

Description: To update an existing test cycle. You can utilize this API to move the test cycle to other container.

Path Variable:

  • projectId: ID of the project
  • testCycleId: ID of the test cycle which needs to be updated

Request Parameter: use these parameters in case you want to move the test cycle to other container.

Important_icon.pngImportant: If you use the request parameters, the request body will be ignore. That means the test cycle 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 cycle to under root.
Specify a release ID to move the test cycle to that release.
Specify a parent test cycle ID to move the test cycle to that parent test cycle.
parentType yes Input root in case you are moving the test cycle to under root.
Input release in case you are moving the test cycle to under a release.
Input test-cycle in case you are moving the test cycle to under a parent test cycle.

Request sample:

PUT /api/v3/projects/14921/test-cycles/125019?parentId=0&parentType=root HTTP/1.1
Host: nephele.qtestnet.com
Content-Type: application/json
Authorization: --
Cache-Control: no-cache

{
  "name": "Cycle 1 - Move test-cycle to root",
  "description": "Move test-cycle to root"
}

Response sample:

{
    "links": [
        {
            "rel": "test-suites",
            "href": "https://nephele.qtestnet.com/api/v3/projects/14921/test-suites?parentId=125019&parentType=test-cycle"
        },
        {
            "rel": "test-runs",
            "href": "https://nephele.qtestnet.com/api/v3/projects/14921/test-runs?parentId=125019&parentType=test-cycle"
        }
    ],
    "id": 125019,
    "name": "Cycle 1",
    "order": 0,
    "pid": "CL-21",
    "web_url": "https://nephele.qtestnet.com/p/14921/portal/project#tab=testexecution&object=4&id=125019",
    "description": "Move test-cycle to root"
}

Delete A Test Cycle

DELETE /api/v3/projects/{projectId}/test-cycles/{testCycleId}

qTest version: 6+

Description: To delete a test cycle

Path variable:

  • projectId: ID of the project
  • testCycleId: ID of the test cycle which needs to be deleted

Request Parameter:

Parameter Required Description
force no force=true - delete the test cycle and its children.
force=false - only delete the test cycle if it contains no children. This is the default value.