This topic lists API operations you can use to migrate your test cases to Zephyr Enterprise. For more information on data migration, see Migrating to Zephyr Enterprise.
To get started with Zephyr Enterprise REST API, see Zephyr Enterprise REST API Documentation.
Supported Migration Entities
Projects
Users
Requirements
Tests
Test Attachments
Test Steps
Step Attachments
Test Folder Organization
Test Custom Fields
Release
Cycle
Test Run (test execution in Zephyr)
API definition in the API Blueprint format is available here:
Below is a sequence of steps you need to perform to migrate test cases from HP ALM to Zephyr Enterprise by using Zephyr REST API and a list of REST API operations you will use when migrating your test cases.
Operation | Description |
---|---|
POST /flex/services/rest/v3/role | Create a user role. |
PUT /flex/services/rest/v3/role/permission?roleid={role ID} | Assign a permission to the user role. |
Learn more here.
Operation | Description |
---|---|
POST /flex/services/rest/latest/user | Create a new Zephyr Enterprise user. |
PUT /flex/services/rest/v3/user/{user ID} | Assign the role you created earlier to the user. |
Learn more here.
Operation | Description |
---|---|
POST /flex/services/rest/latest/project | Create a project in Zephyr Enterprise. |
PUT /flex/services/rest/latest/project | Assign the user to the project. |
Learn more here.
Operation | Description |
---|---|
POST /flex/services/rest/latest/field | Create a custom field. |
PUT /flex/services/rest/v3/admin/preference | Specify values for the custom field. |
Learn more here.
Operation | Description |
---|---|
POST /flex/services/rest/latest/release/ | Create a release. |
Learn more here.
Operation | Description |
---|---|
POST /flex/services/rest/v3/testcasetree?parentid=0&assignedusers= | Create a folder or phase. |
POST /flex/services/rest/v3/testcasetree?parentid={ID of the parent folder} | Create a sub-folder or sub-phase. |
POST /flex/services/rest/latest/testcase/ | Create a test case. |
POST /flex/services/rest/latest/attachment/list | Attach a file to a test case (before attaching the file, upload it to the server). |
PUT /flex/services/rest/v3/testcase/{id} | Update an existing test case (update the tag, priority, custom fields, etc.) |
POST /flex/services/rest/latest/testcase/{testcaseVersionId}/teststep/detail/{tctId} | Create a test step. |
PUT /flex/services/rest/latest/testcase/{testcaseVersionId}/teststep/detail/{tctId} | Update an existing test step. |
Learn more here.
Operation | Description |
---|---|
POST /flex/services/rest/latest/cycle | Create a cycle. |
POST /flex/services/rest/v3/cycle/{cycleid}/phase | Create a cycle phase from the Test Repository. |
POST /flex/services/rest/v3/cycle/{cycleid}/phase | Create a cycle phase (a free-form phase) |
By browsing the test case tree: POST /flex/services/rest/v3/assignmenttree/{cyclephaseid}/assign/bytree/{parenttreeid}?includehierarchy=false By performing a quick or an advanced search (ZQL): POST /flex/services/rest/v3/assignmenttree/{cyclephaseid}/assign/bysearch/{parenttreeid}?maxresults=10&zql=false&includehierarchy=false By pulling test cases from other cycles or phases: POST /flex/services/rest/latest/assignmenttree/{cyclephaseid}/assign/byschedule?maxresults=10&scheduleids=&maintainassignments=false&parenttreeid=&includehierarchy=false&isCreateWithLatestVersion=true | Add the test case to the free-form phase in any of the following ways:
|
PUT /flex/services/rest/v3/assignmenttree/{cyclePhaseID}/bulk/tree/{tcrCatalogTreeId}/from/-1/to/{UserID}?cascade=true&easmode=2 | Assign the test case to the user for execution. |
Learn more here.
Operation | Description |
---|---|
POST /flex/services/rest/latest/execution/{ExecutionID}?status={Status}&testerid={UserId}&allExecutions=false&includeanyoneuser=true | Execute the test case. |
Learn more here.
Operation | Description |
---|---|
POST /flex/services/rest/latest/requirementtree/add | Create a requirement tree in the release node. |
POST /flex/services/rest/latest/requirementtree/add | Create a requirement tree sub-folder. |
POST /flex/services/rest/latest/requirement | Create a requirement. |
PUT /flex/services/rest/latest/requirement/{id} | Update an existing requirement. |
| Link the test case to requirements in one of the following ways:
|
POST /flex/services/rest/latest/externalrequirement/importall?projectId=1 | Synchronize requirements. |
Learn more here.
Operation | Description |
---|---|
GET /flex/services/rest/v3/usertoken/ | Get a user token. |
POST /flex/services/rest/v3/usertoken/ | Create a user token. |
DELETE /flex/services/rest/v3/usertoken/{id} | Delete a user token. |
DELETE /flex/services/rest/v3/usertoken/all | Delete all user tokens. |
Learn more here.
Operation | Description |
---|---|
POST /flex/services/rest/v3/fieldmap | Map the fields. |
POST /flex/services/rest/v3/import | Create an import job. |
POST /flex/upload/document/genericattachment | Upload the file to the system using the genericattachment call. |
PUT /flex/services/rest/v3/import/execute/{id}/{action} | Run the import job. |
Learn more here.