Panel | ||||||
---|---|---|---|---|---|---|
| ||||||
Starting October 11, 2024 (Zephyr Enterprise 8.2), the Zephyr Enterprise documentation moved from its current location on Atlassian to a dedicated, standalone Zephyr Enterprise documentation page. Please see: https://support.smartbear.com/zephyr-enterprise/docs/en/migrating-to-zephyr-enterprise/via-rest-api/test-planning--cycles-and-phases-.html |
Table of Contents |
---|
Create a cycle
...
Code Block | ||
---|---|---|
| ||
{ "name": "Cycle two", "build": "", "environment": "", "status": 0, "cycleStartDate": "11/01/2019", "cycleEndDate": "11/15/2019", "releaseId": 1 } |
name - thecycle name.
build = the build number.
releaseId = the ID of the release where you want to create the cycle.
...
Code Block | ||
---|---|---|
| ||
{ "phaseStartDate":"07/16/2020", "phaseEndDate":"07/31/2020", "freeForm":false, "tcrCatalogTreeId":1 } |
PhaseStartDate - the start date of the cycle.
PhaseEndDate - the end date of the cycle.
freeForm (boolean) - false if you want to pull the whole folder from repository.
tcrCatalogTreeId - the tree ID of the folder in the repository.
...
Code Block | ||
---|---|---|
| ||
{ "phaseStartDate":"07/17/2020", "phaseEndDate":"07/31/2020", "releaseId":12, "name":"new Phase Z", "freeForm":true } |
PhaseStartDate - the start date of the phase.
PhaseEndDate - the end date of the phase.
freeForm (boolean) - true.
name - the name of the cycle phase.
...
http://{ZEPHYR-SERVER}/flex/services/rest/v3/assignmenttree/{cyclephaseid}/assign/bytree/{parenttreeid}?includehierarchy=false
cyclephaseid - the ID of the cycle phase.
parenttreeid - the ID of the parent tree.
includehierarchy - (boolean). If true
, the tree structure will be as it is in the Test Repository. If false
, the test case will be added to a free form phase (parent node).
...
Code Block | ||
---|---|---|
| ||
[ { "treeid": 8, "tctIds": [], "isExclusion": false }, { "treeid": 9, "tctIds": [], "isExclusion": false } ] |
treeid - the ID of the tree that should be added to the free-form phase.
...
Code Block |
---|
[ { "treeid": 8, "tctIds": [ 100, 101 ], "isExclusion": true }, { "treeid": 9, "tctIds": [ 105 ], "isExclusion": true } ] |
tctIds - the test case version ID you got from the response of the added or updated test case.
...
http://localhost/flex/services/rest/v3/assignmenttree/3/assign/bysearch/17?includehierarchy=false&zql=true&searchquery=priority = "P2"&maxresults=10
Other search parameters: estimatedTime, testcaseid, tag, creator, release, project, priority, altid, automated, folder, contents, comments, name and custom fields.
cyclephaseid - you get it from the response upon adding a phase to the cycle.
parenttreeid - the tree ID of the free-form phase you get in the response upon adding a phase to the cycle.
includehierarchy - (boolean). If true
, the tree structure will be as that in the Test Repository. If false
, the test case will be added to the free-form phase (parent node).
maxresults - will fetch the results accordingly (if 10 is given, will fetch only 10 records).
zql - can be true or false. If true
, you need to provide a ZQL query in the searchquery
parameter. If false
, can perform a basic search. You need to add search criteria in the searchquery
parameter.
...
Code Block | ||
---|---|---|
| ||
http://localhost/flex/services/rest/v3/assignmenttree/3/assign/bysearch/17?includehierarchy=false&zql=true&searchquery=priority = "P2"&maxresults=10 { "ids": [ 101, 102 ] } |
101 and 102 - the tctID you get from the response upon adding or updating the test case.
...
http://{ZEPHYR-SERVER}/flex/services/rest/latest/assignmenttree/{cyclephaseid}/assign/byschedule?maxresults=10&scheduleids=&maintainassignments=false&parenttreeid=&includehierarchy=false&isCreateWithLatestVersion=true
{cyclephaseid} - the ID of the cycle phase.
...
Code Block | ||
---|---|---|
| ||
http://localhost/flex/services/rest/v3/assignmenttree/5/assign/byschedule/?includehierarchy=false&maintainassignments=false&isCreateWithLatestVersion=false&parenttreeid=21 { "ids": [ 11, 12, 13, 14, 15, 16, 17 ] } |
maintainassignments - true
or false
. If true
, the test case will be added with assignment. If false
, the test case will be unassigned.
includehierarchy - true
or false
. If true
, the tree structure will be as that in the Test Repository. If false
, the test case will be added to a free-form phase which is in the parent node.
parenttreeid - the tree ID of free-form phase you got in the response upon adding a phase to the cycle.
isCreateWithLatestVersion = true
or false
. If true
, the latest version of the test case will be added. If false
, the test case version that is linked to the test execution will be added.
scheduleids - the execution ID. You will get it in the response upon assigning the test case to a user. Multiple values can be passed as scheduleids=1&scheduleids =2&scheduleids =3
and so on.
...
Code Block | ||
---|---|---|
| ||
{ "Add": [ { "id": 2000, "assignmentDate": "2020-07-17", "status": "1", "testerId": -10, "tcrTreeTestcase": { "id": 3999, "tcrCatalogTreeId": 164, "revision": 6, "stateFlag": 0, "lastModifiedOn": 1594991704000, "versionNumber": 1, "createDatetime": 1594991704000, "createdById": 5, "modifiedById": 5, "testcase": { "customProperties": {}, "customProcessedProperties": {}, "id": 1160, "name": "Untitled", "description": "", "lastModifiedOn": 1594991314000, "creationDate": 1594969200000, "createDatetime": 1594991314000, "tcCreationDate": "07/17/2020", "isComplex": false, "estimatedTime": 600, "writerId": 0, "creatorId": 5, "lastUpdaterId": 5, "oldId": 0, "automated": false, "customFieldProcessed": false, "customFieldValues": [], "testcaseSequence": { "seqNumber": 1005 }, "testcaseId": 1005, "versionNumber": 1, "projectId": 6, "testcaseType": "ORIGINAL", "requirementIds": [], "requirementIdsNew": [], "automatedDefault": false, "testcaseShared": false }, "projectId": 6, "releaseId": 12, "isDerivedFromBDD": false, "orderId": 1999, "maxVersionNumber": 1, "projectIdParam": 6, "original": false }, "cyclePhaseId": 6, "lastModifiedBy": 5, "createdById": 5, "lastModifiedOn": 1594991763833, "createDatetime": 1594991763833, "changeBy": 5 }, { "id": 2001, "assignmentDate": "2020-07-17", "status": "1", "testerId": -10, "tcrTreeTestcase": { "id": 4000, "tcrCatalogTreeId": 164, "revision": 6, "stateFlag": 0, "lastModifiedOn": 1594991704000, "versionNumber": 1, "createDatetime": 1594991704000, "createdById": 5, "modifiedById": 5, "testcase": { "customProperties": {}, "customProcessedProperties": {}, "id": 1161, "name": "Untitled", "description": "", "lastModifiedOn": 1594991315000, "creationDate": 1594969200000, "createDatetime": 1594991315000, "tcCreationDate": "07/17/2020", "isComplex": false, "estimatedTime": 600, "writerId": 0, "creatorId": 5, "lastUpdaterId": 5, "oldId": 0, "automated": false, "customFieldProcessed": false, "customFieldValues": [], "testcaseSequence": { "seqNumber": 1006 }, "testcaseId": 1006, "versionNumber": 1, "projectId": 6, "testcaseType": "ORIGINAL", "requirementIds": [], "requirementIdsNew": [], "automatedDefault": false, "testcaseShared": false }, "projectId": 6, "releaseId": 12, "isDerivedFromBDD": false, "orderId": 2000, "maxVersionNumber": 1, "projectIdParam": 6, "original": false }, "cyclePhaseId": 6, "lastModifiedBy": 5, "createdById": 5, "lastModifiedOn": 1594991763834, "createDatetime": 1594991763834, "changeBy": 5 }, { "id": 2002, "assignmentDate": "2020-07-17", "status": "1", "testerId": -10, "tcrTreeTestcase": { "id": 4001, "tcrCatalogTreeId": 164, "revision": 6, "stateFlag": 0, "lastModifiedOn": 1594991704000, "versionNumber": 1, "createDatetime": 1594991704000, "createdById": 5, "modifiedById": 5, "testcase": { "customProperties": {}, "customProcessedProperties": {}, "id": 1162, "name": "Untitled", "description": "", "lastModifiedOn": 1594991315000, "creationDate": 1594969200000, "createDatetime": 1594991315000, "tcCreationDate": "07/17/2020", "isComplex": false, "estimatedTime": 600, "writerId": 0, "creatorId": 5, "lastUpdaterId": 5, "oldId": 0, "automated": false, "customFieldProcessed": false, "customFieldValues": [], "testcaseSequence": { "seqNumber": 1007 }, "testcaseId": 1007, "versionNumber": 1, "projectId": 6, "testcaseType": "ORIGINAL", "requirementIds": [], "requirementIdsNew": [], "automatedDefault": false, "testcaseShared": false }, "projectId": 6, "releaseId": 12, "isDerivedFromBDD": false, "orderId": 2001, "maxVersionNumber": 1, "projectIdParam": 6, "original": false }, "cyclePhaseId": 6, "lastModifiedBy": 5, "createdById": 5, "lastModifiedOn": 1594991763835, "createDatetime": 1594991763835, "changeBy": 5 } ], "Delete": [], "Update": [] } |
cyclePhaseId - the ID of the cycle phase you got upon creating the cycle phase.
tcrCatalogTreeId - the ID of the tcrcatalogtree
you got upon creating the cycle phase.
UserId - the ID of the user who will be assigned to the test case.
cascade (boolean) - if true
, the test case will be assigned to the sub-folders as well. If false
, It will be assigned only to the current folder.
The response will be empty.
...