Via REST API
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.html
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
Zephyr REST API supports migration of the following 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 Blueprint
API definition in the API Blueprint format is available here:
https://zephyrenterprisev3.docs.apiary.io
Reference
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.
1. Create a role and assign a permission to it.
Operation | Description |
---|---|
Create a user role. | |
Assign a permission to the user role. |
2. Create a user and assign the role to the user.
Operation | Description |
---|---|
Create a new Zephyr Enterprise user. | |
Assign the role you created earlier to the user. |
3. Create a project in Zephyr Enterprise and assign the user to it.
Operation | Description |
---|---|
Create a project in Zephyr Enterprise. | |
Assign the user to the project. |
4. Create a custom field and add values to it.
Operation | Description |
---|---|
Create a custom field. | |
Specify values for the custom field. |
5. Create a release.
Operation | Description |
---|---|
Create a release. |
6. Create a test case tree.
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. |
Create a test case. | |
Attach a file to a test case (before attaching the file, upload it to the server). | |
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. |
7. Test planning.
Operation | Description |
---|---|
Create a cycle. | |
Create a cycle phase from the Test Repository. | |
Create a cycle phase (a free-form phase) | |
By browsing the test case tree: By performing a quick or an advanced search (ZQL): By pulling test cases from other cycles or phases: | Add the test case to the free-form phase in any of the following ways:
|
Assign the test case to the user for execution. |
8. Execute the test case.
Operation | Description |
---|---|
Execute the test case. |
9. Create requirements.
Operation | Description |
---|---|
Create a requirement tree in the release node. | |
Create a requirement tree sub-folder. | |
Create a requirement. | |
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. |
10. Access tokens.
Operation | Description |
---|---|
Get a user token. | |
Create a user token. | |
Delete a user token. | |
Delete all user tokens. |
11. Import the test case.
Operation | Description |
---|---|
Map the fields. | |
Create an import job. | |
Upload the file to the system using the genericattachment call. | |
Run the import job. |
Starting Release 8.2, Zephyr Enterprise documentation is moving from its current location on Atlassian to a dedicated, standalone Zephyr Enterprise Documentation page. https://support.smartbear.com/zephyr-enterprise/docs/en/welcome-to-zephyr-enterprise.html