Create a Test Case Tree

Create a folder or phase

Use the following operation to create a folder or phase in Zephyr Enterprise:

POST /flex/services/rest/v3/testcasetree?parentid=0&assignedusers=

Request format

To create a folder or phase, send a POST request to the following URL:

http://{ZEPHYR-SERVER}/flex/services/rest/v3/testcasetree?parentid=0&assignedusers=

Request body

{ "name":"N4", "description":"", "type":"Phase", "releaseId":1 }

releaseId - the ID of the release.
For information on creating a tree node, see Create Tree Node.

Response body

{ "id": 17, "type": "Phase", "name": "N4", "description": "", "revision": 0, "categories": [], "assignedUsers": [1,2,3,5,6,7,8], "releaseId": 1, "linkedTCRCatalogTreeId": 0, "createdOn": 1588073471630, "createdBy": 1, "lastModifiedBy": 1, "lastModifiedOn": 1588073471641, "testcaseCount": 0, "cumulativeTestcaseCount": 0 }

Create a sub-folder or sub-phase

Use the following operation to create a sub-folder or sub-phase in Zephyr Enterprise:

POST /flex/services/rest/v3/testcasetree?parentid={ID of the parent folder}

Request format

To create a sub-folder or sub-phase, send a POST request to the following URL:

http://{ZEPHYR-SERVER}/flex/services/rest/v3/testcasetree?parentid={ID of the parent folder}

Request body

{ "name":"Sub Folder", "description":"", "type":"Module", "releaseId":1 }

releaseId - the ID of the release.
parentid - the ID of the parent folder of the sub-folder you want to create.
For information on creating a tree node, see Create Tree Node.

Response body

Create a test case

Use the following operation to create a test case in Zephyr Enterprise:

POST /flex/services/rest/latest/testcase/

Request format

To create a test case, send a POST request to the following URL:

http://{ZEPHYR-SERVER}/flex/services/rest/latest/testcase/

Request body

tcrCatalogTreeId - the ID of the folder where you want to create the test case.

For more information on creating test cases, see Create Test Case.
Response body

Update an existing test case (update the tag, priority, custom fields, etc.)

Use the following operation to update a test case in Zephyr Enterprise:

PUT /flex/services/rest/v3/testcase/{id}

Request format

To update a test case, send a PUT request to the following URL:

http://{ZEPHYR-SERVER}/flex/services/rest/v3/testcase/{id}

{id} - the ID of the entity you want to update.

Request body

Response body

Create a test step

Use the following operation to create a test step in Zephyr Enterprise:

POST /flex/services/rest/latest/testcase/{testcaseVersionId}/teststep/detail/{tctId}

Request format

To create a test step, send a POST request to the following URL:

http://{ZEPHYR-SERVER}/flex/services/rest/latest/testcase/{testcaseVersionId}/teststep/detail/{tctId}

{testcaseVersionId} - the ID of the test case version.
tctId - test case ID in the test case tree.

Request body

tcId - the test case ID.
maxId - the maximum number of steps.
orderId - the step order ID.

Response body

For more information on test step creation, see Create Test Step.

Update a test step

Use the following operation to update an existing test step in Zephyr Enterprise:

PUT /flex/services/rest/latest/testcase/{testcaseVersionId}/teststep/detail/{tctId}

Request format

To update an existing test step, send a PUT request to the following URL:

http://{ZEPHYR-SERVER}/flex/services/rest/latest/testcase/{testcaseVersionId}/teststep/detail/{tctId}

{testcaseVersionId} - the ID of the test case version.
tctId - test case ID in the test case tree.

Request body

tcId - the test case ID.
maxId - the maximum number of steps.
orderId - the step order ID.

See Also

Migration REST API