@rbaileysr/zephyr-managed-api 1.3.8 → 1.3.10
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +247 -254
- package/dist/README.md +247 -254
- package/dist/groups/Private/PrivateAuthentication.d.ts +42 -2
- package/dist/groups/Private/PrivateAuthentication.d.ts.map +1 -1
- package/dist/groups/Private/PrivateAuthentication.js +125 -0
- package/dist/groups/Private/PrivateTestExecutions.d.ts +174 -0
- package/dist/groups/Private/PrivateTestExecutions.d.ts.map +1 -0
- package/dist/groups/Private/PrivateTestExecutions.js +599 -0
- package/dist/groups/Private/PrivateTestScriptData.d.ts +152 -0
- package/dist/groups/Private/PrivateTestScriptData.d.ts.map +1 -0
- package/dist/groups/Private/PrivateTestScriptData.js +443 -0
- package/dist/groups/Private/PrivateVersionControl.d.ts +3 -4
- package/dist/groups/Private/PrivateVersionControl.d.ts.map +1 -1
- package/dist/groups/Private/PrivateVersionControl.js +53 -11
- package/dist/groups/Private.d.ts +12 -0
- package/dist/groups/Private.d.ts.map +1 -1
- package/dist/groups/Private.js +4 -0
- package/dist/package.json +1 -1
- package/dist/types.d.ts +457 -1
- package/dist/types.d.ts.map +1 -1
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -44,29 +44,29 @@ const apiEU = createZephyrApi(
|
|
|
44
44
|
## Supported API calls
|
|
45
45
|
|
|
46
46
|
- [fetch](https://docs.adaptavist.com/src/managed-apis/managed-api-abstractions)
|
|
47
|
-
- Project
|
|
47
|
+
- ### Project
|
|
48
48
|
- [listProjects](https://support.smartbear.com/zephyr-scale-cloud/api-docs/#tag/Projects/operation/listProjects)
|
|
49
49
|
- [getProject](https://support.smartbear.com/zephyr-scale-cloud/api-docs/#tag/Projects/operation/getProject)
|
|
50
|
-
- Status
|
|
50
|
+
- ### Status
|
|
51
51
|
- [listStatuses](https://support.smartbear.com/zephyr-scale-cloud/api-docs/#tag/Statuses/operation/listStatuses)
|
|
52
52
|
- [getStatus](https://support.smartbear.com/zephyr-scale-cloud/api-docs/#tag/Statuses/operation/getStatus)
|
|
53
53
|
- [createStatus](https://support.smartbear.com/zephyr-scale-cloud/api-docs/#tag/Statuses/operation/createStatus)
|
|
54
54
|
- [updateStatus](https://support.smartbear.com/zephyr-scale-cloud/api-docs/#tag/Statuses/operation/updateStatus)
|
|
55
|
-
- Priority
|
|
55
|
+
- ### Priority
|
|
56
56
|
- [listPriorities](https://support.smartbear.com/zephyr-scale-cloud/api-docs/#tag/Priorities/operation/listPriorities)
|
|
57
57
|
- [getPriority](https://support.smartbear.com/zephyr-scale-cloud/api-docs/#tag/Priorities/operation/getPriority)
|
|
58
58
|
- [createPriority](https://support.smartbear.com/zephyr-scale-cloud/api-docs/#tag/Priorities/operation/createPriority)
|
|
59
59
|
- [updatePriority](https://support.smartbear.com/zephyr-scale-cloud/api-docs/#tag/Priorities/operation/updatePriority)
|
|
60
|
-
- Environment
|
|
60
|
+
- ### Environment
|
|
61
61
|
- [listEnvironments](https://support.smartbear.com/zephyr-scale-cloud/api-docs/#tag/Environments/operation/listEnvironments)
|
|
62
62
|
- [getEnvironment](https://support.smartbear.com/zephyr-scale-cloud/api-docs/#tag/Environments/operation/getEnvironment)
|
|
63
63
|
- [createEnvironment](https://support.smartbear.com/zephyr-scale-cloud/api-docs/#tag/Environments/operation/createEnvironment)
|
|
64
64
|
- [updateEnvironment](https://support.smartbear.com/zephyr-scale-cloud/api-docs/#tag/Environments/operation/updateEnvironment)
|
|
65
|
-
- Folder
|
|
65
|
+
- ### Folder
|
|
66
66
|
- [listFolders](https://support.smartbear.com/zephyr-scale-cloud/api-docs/#tag/Folders/operation/listFolders)
|
|
67
67
|
- [getFolder](https://support.smartbear.com/zephyr-scale-cloud/api-docs/#tag/Folders/operation/getFolder)
|
|
68
68
|
- [createFolder](https://support.smartbear.com/zephyr-scale-cloud/api-docs/#tag/Folders/operation/createFolder)
|
|
69
|
-
- TestCase
|
|
69
|
+
- ### TestCase
|
|
70
70
|
- [listTestCases](https://support.smartbear.com/zephyr-scale-cloud/api-docs/#tag/Test-Cases/operation/listTestCases)
|
|
71
71
|
- [listTestCasesCursorPaginated](https://support.smartbear.com/zephyr-scale-cloud/api-docs/#tag/Test-Cases/operation/listTestCasesCursorPaginated)
|
|
72
72
|
- [getTestCase](https://support.smartbear.com/zephyr-scale-cloud/api-docs/#tag/Test-Cases/operation/getTestCase)
|
|
@@ -81,7 +81,7 @@ const apiEU = createZephyrApi(
|
|
|
81
81
|
- [createTestCaseTestScript](https://support.smartbear.com/zephyr-scale-cloud/api-docs/#tag/Test-Cases/operation/createTestCaseTestScript)
|
|
82
82
|
- [getTestCaseTestSteps](https://support.smartbear.com/zephyr-scale-cloud/api-docs/#tag/Test-Cases/operation/getTestCaseTestSteps)
|
|
83
83
|
- [createTestCaseTestSteps](https://support.smartbear.com/zephyr-scale-cloud/api-docs/#tag/Test-Cases/operation/createTestCaseTestSteps)
|
|
84
|
-
- TestCycle
|
|
84
|
+
- ### TestCycle
|
|
85
85
|
- [listTestCycles](https://support.smartbear.com/zephyr-scale-cloud/api-docs/#tag/Test-Cycles/operation/listTestCycles)
|
|
86
86
|
- [getTestCycle](https://support.smartbear.com/zephyr-scale-cloud/api-docs/#tag/Test-Cycles/operation/getTestCycle)
|
|
87
87
|
- [createTestCycle](https://support.smartbear.com/zephyr-scale-cloud/api-docs/#tag/Test-Cycles/operation/createTestCycle)
|
|
@@ -89,14 +89,14 @@ const apiEU = createZephyrApi(
|
|
|
89
89
|
- [getTestCycleLinks](https://support.smartbear.com/zephyr-scale-cloud/api-docs/#tag/Test-Cycles/operation/getTestCycleLinks)
|
|
90
90
|
- [createTestCycleIssueLink](https://support.smartbear.com/zephyr-scale-cloud/api-docs/#tag/Test-Cycles/operation/createTestCycleIssueLink)
|
|
91
91
|
- [createTestCycleWebLink](https://support.smartbear.com/zephyr-scale-cloud/api-docs/#tag/Test-Cycles/operation/createTestCycleWebLink)
|
|
92
|
-
- TestPlan
|
|
92
|
+
- ### TestPlan
|
|
93
93
|
- [listTestPlans](https://support.smartbear.com/zephyr-scale-cloud/api-docs/#tag/Test-Plans/operation/listTestPlans)
|
|
94
94
|
- [getTestPlan](https://support.smartbear.com/zephyr-scale-cloud/api-docs/#tag/Test-Plans/operation/getTestPlan)
|
|
95
95
|
- [createTestPlan](https://support.smartbear.com/zephyr-scale-cloud/api-docs/#tag/Test-Plans/operation/createTestPlan)
|
|
96
96
|
- [createTestPlanIssueLink](https://support.smartbear.com/zephyr-scale-cloud/api-docs/#tag/Test-Plans/operation/createTestPlanIssueLink)
|
|
97
97
|
- [createTestPlanWebLink](https://support.smartbear.com/zephyr-scale-cloud/api-docs/#tag/Test-Plans/operation/createTestPlanWebLink)
|
|
98
98
|
- [createTestPlanTestCycleLink](https://support.smartbear.com/zephyr-scale-cloud/api-docs/#tag/Test-Plans/operation/createTestPlanTestCycleLink)
|
|
99
|
-
- TestExecution
|
|
99
|
+
- ### TestExecution
|
|
100
100
|
- [listTestExecutions](https://support.smartbear.com/zephyr-scale-cloud/api-docs/#tag/Test-Executions/operation/listTestExecutions)
|
|
101
101
|
- [listTestExecutionsNextgen](https://support.smartbear.com/zephyr-scale-cloud/api-docs/#tag/Test-Executions/operation/listTestExecutionsNextgen)
|
|
102
102
|
- [getTestExecution](https://support.smartbear.com/zephyr-scale-cloud/api-docs/#tag/Test-Executions/operation/getTestExecution)
|
|
@@ -107,59 +107,65 @@ const apiEU = createZephyrApi(
|
|
|
107
107
|
- [syncTestExecutionScript](https://support.smartbear.com/zephyr-scale-cloud/api-docs/#tag/Test-Executions/operation/syncTestExecutionScript)
|
|
108
108
|
- [listTestExecutionLinks](https://support.smartbear.com/zephyr-scale-cloud/api-docs/#tag/Test-Executions/operation/listTestExecutionLinks)
|
|
109
109
|
- [createTestExecutionIssueLink](https://support.smartbear.com/zephyr-scale-cloud/api-docs/#tag/Test-Executions/operation/createTestExecutionIssueLink)
|
|
110
|
-
- Link
|
|
110
|
+
- ### Link
|
|
111
111
|
- [deleteLink](https://support.smartbear.com/zephyr-scale-cloud/api-docs/#tag/Links/operation/deleteLink)
|
|
112
|
-
- IssueLink
|
|
112
|
+
- ### IssueLink
|
|
113
113
|
- [getIssueLinkTestCases](https://support.smartbear.com/zephyr-scale-cloud/api-docs/#tag/Issue-Links/operation/getIssueLinkTestCases)
|
|
114
114
|
- [getIssueLinkTestCycles](https://support.smartbear.com/zephyr-scale-cloud/api-docs/#tag/Issue-Links/operation/getIssueLinkTestCycles)
|
|
115
115
|
- [getIssueLinkTestPlans](https://support.smartbear.com/zephyr-scale-cloud/api-docs/#tag/Issue-Links/operation/getIssueLinkTestPlans)
|
|
116
116
|
- [getIssueLinkExecutions](https://support.smartbear.com/zephyr-scale-cloud/api-docs/#tag/Issue-Links/operation/getIssueLinkExecutions)
|
|
117
|
-
- Automation
|
|
117
|
+
- ### Automation
|
|
118
118
|
- [createCustomExecutions](https://support.smartbear.com/zephyr-scale-cloud/api-docs/#tag/Automation/operation/createCustomExecutions)
|
|
119
119
|
- [createCucumberExecutions](https://support.smartbear.com/zephyr-scale-cloud/api-docs/#tag/Automation/operation/createCucumberExecutions)
|
|
120
120
|
- [createJUnitExecutions](https://support.smartbear.com/zephyr-scale-cloud/api-docs/#tag/Automation/operation/createJUnitExecutions)
|
|
121
121
|
- [retrieveBDDTestCases](https://support.smartbear.com/zephyr-scale-cloud/api-docs/#tag/Automation/operation/retrieveBDDTestCases)
|
|
122
|
-
- Private ⚠️
|
|
123
|
-
> **⚠️ WARNING: Private API Methods**
|
|
124
|
-
>
|
|
125
|
-
> The following methods use Zephyr's private/unofficial API endpoints that are:
|
|
126
|
-
> - **Not officially supported** by SmartBear
|
|
127
|
-
> - **Not part of the public API documentation**
|
|
128
|
-
> - **Subject to change at any time** without notice
|
|
129
|
-
> - **Not covered by Standard Support**
|
|
130
|
-
>
|
|
131
|
-
> Use these methods at your own risk. They may break with future Zephyr updates.
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
122
|
+
- ### **Private** ⚠️
|
|
123
|
+
> **⚠️ WARNING: Private API Methods**
|
|
124
|
+
>
|
|
125
|
+
> The following methods use Zephyr's private/unofficial API endpoints that are:
|
|
126
|
+
> - **Not officially supported** by SmartBear
|
|
127
|
+
> - **Not part of the public API documentation**
|
|
128
|
+
> - **Subject to change at any time** without notice
|
|
129
|
+
> - **Not covered by Standard Support**
|
|
130
|
+
>
|
|
131
|
+
> Use these methods at your own risk. They may break with future Zephyr updates.
|
|
132
|
+
- ### Authentication
|
|
133
|
+
- **getContextJwt** - Get Jira Context JWT token (required for all private API calls)
|
|
134
|
+
- **enableZephyrForProject** - Enable Zephyr for a Jira project
|
|
135
|
+
- **isZephyrEnabledForProject** - Check if Zephyr is enabled for a Jira project
|
|
136
|
+
- ### Comments
|
|
137
|
+
- **Test Case**: `getTestCaseComments`, `createTestCaseComment`
|
|
138
|
+
- **Test Cycle**: `getTestCycleComments`, `createTestCycleComment`
|
|
139
|
+
- **Test Plan**: `getTestPlanComments`, `createTestPlanComment`
|
|
140
|
+
- ### Config
|
|
141
|
+
- **CustomFields**: `createCustomField`, `getCustomFields`
|
|
142
|
+
- **Labels**: `getLabels`, `createLabel`
|
|
143
|
+
- **Iterations**: `getIterations`, `createIteration`
|
|
144
|
+
- **DataSets**: `getDataSets`, `createDataSet`, `updateDataSet`
|
|
145
|
+
- **archiveConfig** - Archive a config item (Environment, Iteration, or Status)
|
|
146
|
+
- **unarchiveConfig** - Unarchive a config item (Environment, Iteration, or Status)
|
|
147
|
+
- ### Versions
|
|
148
|
+
- **createTestCaseVersion** - Create a new test case version
|
|
149
|
+
- ### Attachments
|
|
150
|
+
- **Test Case**: `getTestCaseAttachments`, `downloadAttachment`, `createTestCaseAttachment`
|
|
151
|
+
- **Test Step**: `getTestStepAttachments`, `downloadTestStepAttachment`, `createTestStepAttachment`
|
|
152
|
+
- **Test Cycle**: `getTestCycleAttachments`, `downloadTestCycleAttachment`, `createTestCycleAttachment`
|
|
153
|
+
- **Test Plan**: `getTestPlanAttachments`, `downloadTestPlanAttachment`, `createTestPlanAttachment`
|
|
154
|
+
- **Test Execution**: `getTestExecutionAttachments`, `downloadTestExecutionAttachment`, `createTestExecutionAttachment`
|
|
155
|
+
- **Test Execution Step**: `getTestExecutionStepAttachments`, `downloadTestExecutionStepAttachment`, `createTestExecutionStepAttachment`
|
|
156
|
+
- ### VersionControl
|
|
157
|
+
- **Test Case (version-specific)**: `getTestCaseIssueLinks`, `getTestCaseWebLinks`, `getTestCaseTestScript`, `getTestCaseTestSteps`
|
|
158
|
+
- **Test Execution Step**: `getTestExecutionStepIssueLinks`, `createTestExecutionStepIssueLink`
|
|
159
|
+
- ### ExtendedData (supplements public API with extended data: iterations and versions)
|
|
160
|
+
- **Test Cycle**: `getTestCycleIteration`, `updateTestCycleIteration`
|
|
161
|
+
- **Test Execution**: `getTestExecutionIteration`, `updateTestExecutionIteration`, `getTestExecutionVersion`, `updateTestExecutionVersion`
|
|
162
|
+
- ### TestCaseArchiving (access archived test cases and archiving operations)
|
|
163
|
+
- **Test Case**: `getArchivedTestCases`, `archiveTestCases`, `unarchiveTestCases`
|
|
164
|
+
- ### TestScriptData (manage test script data: Parameters and Test Data)
|
|
165
|
+
- **Test Case**: `setTestCaseParamTypeToParameter`, `setTestCaseParameters`, `setTestCaseParamTypeToTestData`, `setTestCaseTestData`, `getTestCaseTestData`, `hasTestCaseTestData`
|
|
166
|
+
- ### TestExecutions (create and update test executions for test cases with test data)
|
|
167
|
+
- **Test Execution**: `createTestExecutionWithTestData`, `updateTestExecution`, `getTestExecutionSteps`, `updateTestExecutionStepStatus`, `updateTestExecutionStepComment`
|
|
168
|
+
- **Test Cycle**: `getTestCycleItems`
|
|
163
169
|
|
|
164
170
|
## Private API Authentication
|
|
165
171
|
|
|
@@ -184,135 +190,82 @@ const credentials = {
|
|
|
184
190
|
|
|
185
191
|
// Get Context JWT token
|
|
186
192
|
const contextJwt = await api.Private.Authentication.getContextJwt(credentials);
|
|
193
|
+
|
|
194
|
+
// Check if Zephyr is enabled for a project
|
|
195
|
+
const status = await api.Private.Authentication.isZephyrEnabledForProject(credentials, {
|
|
196
|
+
projectId: 10349
|
|
197
|
+
});
|
|
198
|
+
// Returns: { id: 10349, key: 'D1', permissionSystemEnabled: false, kanoahTestsEnabled: true, active: 1 }
|
|
199
|
+
|
|
200
|
+
// Enable Zephyr for a project
|
|
201
|
+
await api.Private.Authentication.enableZephyrForProject(credentials, {
|
|
202
|
+
projectId: 10349
|
|
203
|
+
});
|
|
187
204
|
```
|
|
188
205
|
|
|
189
|
-
### Example:
|
|
206
|
+
### Example: Config Operations
|
|
190
207
|
|
|
191
208
|
```typescript
|
|
192
|
-
// Create
|
|
209
|
+
// Create custom field
|
|
193
210
|
const customField = await api.Private.Config.CustomFields.createCustomField(
|
|
194
|
-
credentials,
|
|
195
|
-
'TEST_CASE',
|
|
196
|
-
{
|
|
211
|
+
credentials, 'TEST_CASE', {
|
|
197
212
|
projectId: 10017,
|
|
198
213
|
name: 'Build Number',
|
|
199
214
|
type: 'SINGLE_LINE_TEXT',
|
|
200
|
-
required: false
|
|
201
|
-
index: 4,
|
|
202
|
-
category: 'TEST_CASE',
|
|
203
|
-
archived: false
|
|
215
|
+
required: false
|
|
204
216
|
}
|
|
205
217
|
);
|
|
206
|
-
```
|
|
207
|
-
|
|
208
|
-
### Example: Create Label
|
|
209
218
|
|
|
210
|
-
|
|
211
|
-
// Create a new label
|
|
219
|
+
// Create label
|
|
212
220
|
await api.Private.Config.Labels.createLabel(credentials, {
|
|
213
221
|
projectId: 10233,
|
|
214
222
|
name: 'automated'
|
|
215
223
|
});
|
|
216
224
|
|
|
217
|
-
//
|
|
218
|
-
const labels = await api.Private.Config.Labels.getLabels(credentials, {
|
|
219
|
-
projectId: 10233
|
|
220
|
-
});
|
|
221
|
-
```
|
|
222
|
-
|
|
223
|
-
### Example: Create Iteration
|
|
224
|
-
|
|
225
|
-
```typescript
|
|
226
|
-
// Create a new iteration
|
|
225
|
+
// Create iteration
|
|
227
226
|
const iteration = await api.Private.Config.Iterations.createIteration(credentials, {
|
|
228
227
|
projectId: 10233,
|
|
229
228
|
name: 'Sprint 1',
|
|
230
229
|
description: 'First sprint of Q1'
|
|
231
230
|
});
|
|
232
231
|
|
|
233
|
-
//
|
|
234
|
-
const iterations = await api.Private.Config.Iterations.getIterations(credentials, {
|
|
235
|
-
projectId: 10233
|
|
236
|
-
});
|
|
237
|
-
```
|
|
238
|
-
|
|
239
|
-
### Example: Create and Update Data Set
|
|
240
|
-
|
|
241
|
-
```typescript
|
|
242
|
-
// Create a new data set (empty)
|
|
232
|
+
// Create and update data set
|
|
243
233
|
const dataSet = await api.Private.Config.DataSets.createDataSet(credentials, {
|
|
244
234
|
projectId: 10233,
|
|
245
235
|
name: 'Environment'
|
|
246
236
|
});
|
|
247
|
-
|
|
248
|
-
// Add items/options to the data set
|
|
249
|
-
const updatedDataSet = await api.Private.Config.DataSets.updateDataSet(credentials, {
|
|
237
|
+
await api.Private.Config.DataSets.updateDataSet(credentials, {
|
|
250
238
|
id: dataSet.id,
|
|
251
|
-
name: 'Environment',
|
|
252
239
|
projectId: 10233,
|
|
253
240
|
items: [
|
|
254
241
|
{ name: 'Production', index: 0, archived: false },
|
|
255
|
-
{ name: 'Staging', index: 1, archived: false }
|
|
256
|
-
{ name: 'Development', index: 2, archived: false }
|
|
242
|
+
{ name: 'Staging', index: 1, archived: false }
|
|
257
243
|
]
|
|
258
244
|
});
|
|
259
|
-
|
|
260
|
-
// Get all data sets
|
|
261
|
-
const dataSets = await api.Private.Config.DataSets.getDataSets(credentials, {
|
|
262
|
-
projectId: 10233
|
|
263
|
-
});
|
|
264
245
|
```
|
|
265
246
|
|
|
266
247
|
### Example: Archive and Unarchive Config Items
|
|
267
248
|
|
|
268
249
|
```typescript
|
|
269
|
-
// Archive an environment
|
|
270
|
-
|
|
250
|
+
// Archive an environment or iteration
|
|
251
|
+
await api.Private.Config.archiveConfig(credentials, {
|
|
271
252
|
type: 'Environment',
|
|
272
253
|
id: 10873400,
|
|
273
254
|
projectId: 10233
|
|
274
255
|
});
|
|
275
256
|
|
|
276
|
-
//
|
|
277
|
-
|
|
278
|
-
type: 'Iteration',
|
|
279
|
-
id: 10909775,
|
|
280
|
-
projectId: 10233
|
|
281
|
-
});
|
|
282
|
-
|
|
283
|
-
// Archive a test case status
|
|
284
|
-
const archivedTestCaseStatus = await api.Private.Config.archiveConfig(credentials, {
|
|
257
|
+
// Archive statuses (supports: TestCaseStatus, TestPlanStatus, TestCycleStatus, TestExecutionStatus)
|
|
258
|
+
await api.Private.Config.archiveConfig(credentials, {
|
|
285
259
|
type: 'TestCaseStatus',
|
|
286
260
|
id: 10952238,
|
|
287
261
|
projectId: 10313
|
|
288
262
|
});
|
|
289
263
|
|
|
290
|
-
//
|
|
291
|
-
|
|
292
|
-
type: '
|
|
293
|
-
id:
|
|
294
|
-
projectId:
|
|
295
|
-
});
|
|
296
|
-
|
|
297
|
-
// Archive a test cycle status
|
|
298
|
-
const archivedTestCycleStatus = await api.Private.Config.archiveConfig(credentials, {
|
|
299
|
-
type: 'TestCycleStatus',
|
|
300
|
-
id: 10952244,
|
|
301
|
-
projectId: 10313
|
|
302
|
-
});
|
|
303
|
-
|
|
304
|
-
// Archive a test execution status
|
|
305
|
-
const archivedTestExecutionStatus = await api.Private.Config.archiveConfig(credentials, {
|
|
306
|
-
type: 'TestExecutionStatus',
|
|
307
|
-
id: 10952247,
|
|
308
|
-
projectId: 10313
|
|
309
|
-
});
|
|
310
|
-
|
|
311
|
-
// Unarchive any status (same types supported)
|
|
312
|
-
const unarchivedStatus = await api.Private.Config.unarchiveConfig(credentials, {
|
|
313
|
-
type: 'TestCaseStatus',
|
|
314
|
-
id: 10952238,
|
|
315
|
-
projectId: 10313
|
|
264
|
+
// Unarchive any config item (same types supported)
|
|
265
|
+
await api.Private.Config.unarchiveConfig(credentials, {
|
|
266
|
+
type: 'Iteration',
|
|
267
|
+
id: 10909775,
|
|
268
|
+
projectId: 10233
|
|
316
269
|
});
|
|
317
270
|
```
|
|
318
271
|
|
|
@@ -347,211 +300,228 @@ const attachment = await api.Private.Attachments.createTestCaseAttachment(
|
|
|
347
300
|
);
|
|
348
301
|
```
|
|
349
302
|
|
|
350
|
-
### Example:
|
|
303
|
+
### Example: Version-Specific Data
|
|
351
304
|
|
|
352
305
|
```typescript
|
|
353
|
-
// Get
|
|
306
|
+
// Get version-specific data for test cases (version parameter is optional, defaults to latest)
|
|
354
307
|
const issueLinks = await api.Private.VersionControl.getTestCaseIssueLinks(credentials, {
|
|
355
308
|
testCaseKey: 'PROJ-T1',
|
|
356
|
-
|
|
357
|
-
|
|
358
|
-
|
|
359
|
-
// Get web links for version 2 (previous version)
|
|
360
|
-
const webLinks = await api.Private.VersionControl.getTestCaseWebLinks(credentials, {
|
|
361
|
-
testCaseKey: 'PROJ-T1',
|
|
362
|
-
projectId: 10233,
|
|
363
|
-
version: 2
|
|
309
|
+
projectId: 10233,
|
|
310
|
+
version: 2 // Get links for version 2
|
|
364
311
|
});
|
|
365
312
|
|
|
366
|
-
// Get test script for version 3
|
|
367
313
|
const testScript = await api.Private.VersionControl.getTestCaseTestScript(credentials, {
|
|
368
|
-
testCaseKey: 'PROJ-T1',
|
|
369
|
-
projectId: 10233,
|
|
370
|
-
version: 3
|
|
371
|
-
});
|
|
372
|
-
|
|
373
|
-
// Get test steps for version 4 (current version, if there are 4 versions total)
|
|
374
|
-
const testSteps = await api.Private.VersionControl.getTestCaseTestSteps(credentials, {
|
|
375
314
|
testCaseKey: 'PROJ-T1',
|
|
376
315
|
projectId: 10233,
|
|
377
|
-
version:
|
|
316
|
+
version: 3
|
|
378
317
|
});
|
|
379
318
|
|
|
380
|
-
//
|
|
381
|
-
const
|
|
319
|
+
// Test execution step issue links
|
|
320
|
+
const stepLinks = await api.Private.VersionControl.getTestExecutionStepIssueLinks(credentials, {
|
|
382
321
|
testExecutionKey: 'PROJ-E1',
|
|
383
322
|
stepIndex: 0,
|
|
384
323
|
projectId: 10233
|
|
385
324
|
});
|
|
386
|
-
// Returns: [{ id: 169099471, issueId: '66019', type: 'BLOCKS' }, ...]
|
|
387
325
|
|
|
388
|
-
|
|
389
|
-
const stepLink = await api.Private.VersionControl.createTestExecutionStepIssueLink(credentials, {
|
|
326
|
+
await api.Private.VersionControl.createTestExecutionStepIssueLink(credentials, {
|
|
390
327
|
testExecutionKey: 'PROJ-E1',
|
|
391
328
|
stepIndex: 0,
|
|
392
329
|
issueId: 66019,
|
|
393
|
-
type: 'RELATED',
|
|
394
330
|
projectId: 10233
|
|
395
331
|
});
|
|
332
|
+
// Note: Link type is always 'RELATED' (typeId 3) - the API does not support choosing link types
|
|
396
333
|
```
|
|
397
334
|
|
|
398
|
-
### Example:
|
|
335
|
+
### Example: Extended Data (Supplements Public API)
|
|
399
336
|
|
|
400
|
-
The public API does not support
|
|
337
|
+
The public API does not support iterations for Test Cycles/Executions or Jira version IDs for Test Executions. Use `ExtendedData` to supplement public API calls.
|
|
401
338
|
|
|
402
339
|
```typescript
|
|
403
|
-
//
|
|
404
|
-
|
|
405
|
-
// Create test cycle with public API
|
|
340
|
+
// Test Cycle: Set/get iteration
|
|
406
341
|
const testCycle = await api.TestCycle.createTestCycle({
|
|
407
342
|
projectKey: 'M12',
|
|
408
343
|
name: 'Sprint 1 Testing'
|
|
409
344
|
});
|
|
410
|
-
|
|
411
|
-
// Set iteration using private API (supplements createTestCycle)
|
|
412
345
|
await api.Private.ExtendedData.updateTestCycleIteration(credentials, {
|
|
413
346
|
testCycleKey: testCycle.key,
|
|
414
347
|
projectId: 10313,
|
|
415
348
|
iterationId: 10952254
|
|
416
349
|
});
|
|
417
|
-
|
|
418
|
-
// Get iteration data (supplements getTestCycle)
|
|
419
|
-
const testCycleIteration = await api.Private.ExtendedData.getTestCycleIteration(credentials, {
|
|
350
|
+
const cycleIteration = await api.Private.ExtendedData.getTestCycleIteration(credentials, {
|
|
420
351
|
testCycleKey: 'M12-R1',
|
|
421
352
|
projectId: 10313
|
|
422
353
|
});
|
|
423
|
-
console.log('Test Cycle Iteration ID:', testCycleIteration.iterationId); // null if not set
|
|
424
|
-
|
|
425
|
-
// === Test Execution Iteration ===
|
|
426
354
|
|
|
427
|
-
//
|
|
355
|
+
// Test Execution: Set/get iteration and version
|
|
428
356
|
await api.TestExecution.createTestExecution({
|
|
429
357
|
projectKey: 'M12',
|
|
430
358
|
testCaseKey: 'M12-T1',
|
|
431
359
|
testCycleKey: 'M12-R1',
|
|
432
360
|
statusName: 'Pass'
|
|
433
361
|
});
|
|
434
|
-
|
|
435
|
-
// Note: createTestExecution returns no data, so you need to know the execution key
|
|
436
|
-
// or look it up using listTestExecutions() after creation
|
|
437
|
-
|
|
438
|
-
// Set iteration using private API (supplements createTestExecution)
|
|
362
|
+
// Note: createTestExecution returns void - use known key or look up via listTestExecutions()
|
|
439
363
|
await api.Private.ExtendedData.updateTestExecutionIteration(credentials, {
|
|
440
|
-
testExecutionKey: 'M12-E1',
|
|
364
|
+
testExecutionKey: 'M12-E1',
|
|
441
365
|
projectId: 10313,
|
|
442
366
|
iterationId: 10952254
|
|
443
367
|
});
|
|
444
|
-
|
|
445
|
-
|
|
446
|
-
|
|
447
|
-
|
|
448
|
-
projectId: 10313
|
|
368
|
+
await api.Private.ExtendedData.updateTestExecutionVersion(credentials, {
|
|
369
|
+
testExecutionKey: 'M15-E3',
|
|
370
|
+
projectId: 10316,
|
|
371
|
+
jiraVersionId: 10102
|
|
449
372
|
});
|
|
450
|
-
console.log('Test Execution Iteration ID:', testExecutionIteration.iterationId); // null if not set
|
|
451
373
|
|
|
452
|
-
// Clear
|
|
374
|
+
// Clear by setting to null
|
|
453
375
|
await api.Private.ExtendedData.updateTestCycleIteration(credentials, {
|
|
454
376
|
testCycleKey: 'M12-R1',
|
|
455
377
|
projectId: 10313,
|
|
456
378
|
iterationId: null
|
|
457
379
|
});
|
|
380
|
+
```
|
|
458
381
|
|
|
459
|
-
|
|
460
|
-
|
|
461
|
-
// Create test execution with public API (returns void)
|
|
462
|
-
await api.TestExecution.createTestExecution({
|
|
463
|
-
projectKey: 'M15',
|
|
464
|
-
testCaseKey: 'M15-T3',
|
|
465
|
-
testCycleKey: 'M15-R1',
|
|
466
|
-
statusName: 'Pass'
|
|
467
|
-
});
|
|
382
|
+
### Example: Test Case Archiving
|
|
468
383
|
|
|
469
|
-
|
|
470
|
-
// or look it up using listTestExecutions() after creation
|
|
384
|
+
The public API does not expose the archived flag. Use `TestCaseArchiving` to list, archive, and unarchive test cases.
|
|
471
385
|
|
|
472
|
-
|
|
473
|
-
|
|
474
|
-
|
|
386
|
+
```typescript
|
|
387
|
+
// Get archived test cases (paginated, optional query filter)
|
|
388
|
+
const archived = await api.Private.TestCaseArchiving.getArchivedTestCases(credentials, {
|
|
475
389
|
projectId: 10316,
|
|
476
|
-
|
|
390
|
+
maxResults: 50,
|
|
391
|
+
startAt: 0,
|
|
392
|
+
query: "testCase.name CONTAINS 'migration'" // optional
|
|
477
393
|
});
|
|
478
394
|
|
|
479
|
-
//
|
|
480
|
-
|
|
481
|
-
|
|
482
|
-
|
|
395
|
+
// Archive test cases (single or multiple)
|
|
396
|
+
await api.Private.TestCaseArchiving.archiveTestCases(credentials, {
|
|
397
|
+
projectId: 10316,
|
|
398
|
+
testCaseIds: [288004503, 288004504, 288004505]
|
|
483
399
|
});
|
|
484
|
-
console.log('Jira Version ID:', testExecutionVersion.jiraVersionId); // null if not set
|
|
485
400
|
|
|
486
|
-
//
|
|
487
|
-
await api.Private.
|
|
488
|
-
testExecutionKey: 'M15-E3',
|
|
401
|
+
// Unarchive test cases
|
|
402
|
+
await api.Private.TestCaseArchiving.unarchiveTestCases(credentials, {
|
|
489
403
|
projectId: 10316,
|
|
490
|
-
|
|
404
|
+
testCaseIds: [288004503]
|
|
491
405
|
});
|
|
492
406
|
```
|
|
493
407
|
|
|
494
|
-
###
|
|
408
|
+
### Test Script Data
|
|
495
409
|
|
|
496
|
-
The public API does not expose
|
|
410
|
+
The public API does not expose test script data (Parameters and Test Data). Use `TestScriptData` to manage this data.
|
|
497
411
|
|
|
498
412
|
```typescript
|
|
499
|
-
//
|
|
500
|
-
|
|
501
|
-
|
|
502
|
-
|
|
503
|
-
projectId: 10316,
|
|
504
|
-
maxResults: 50,
|
|
505
|
-
startAt: 0
|
|
413
|
+
// Check if test case has test script data
|
|
414
|
+
const hasData = await api.Private.TestScriptData.hasTestCaseTestData(credentials, {
|
|
415
|
+
testCaseKey: 'M14-T6',
|
|
416
|
+
projectId: 10315
|
|
506
417
|
});
|
|
507
|
-
|
|
508
|
-
|
|
509
|
-
|
|
418
|
+
// Returns: { hasData: true, type: 'PARAMETER' } or { hasData: false, type: null }
|
|
419
|
+
|
|
420
|
+
// Get test script data
|
|
421
|
+
const testData = await api.Private.TestScriptData.getTestCaseTestData(credentials, {
|
|
422
|
+
testCaseKey: 'M14-T6',
|
|
423
|
+
projectId: 10315
|
|
510
424
|
});
|
|
425
|
+
// Returns: { paramType: 'PARAMETER' | 'TEST_DATA' | null, parameters: [...], testData: [...] }
|
|
511
426
|
|
|
512
|
-
//
|
|
513
|
-
|
|
514
|
-
|
|
515
|
-
|
|
516
|
-
maxResults: 100
|
|
427
|
+
// Set test case to use Parameters
|
|
428
|
+
await api.Private.TestScriptData.setTestCaseParamTypeToParameter(credentials, {
|
|
429
|
+
testCaseKey: 'M14-T6',
|
|
430
|
+
projectId: 10315
|
|
517
431
|
});
|
|
518
432
|
|
|
519
|
-
//
|
|
433
|
+
// Set parameters
|
|
434
|
+
await api.Private.TestScriptData.setTestCaseParameters(credentials, {
|
|
435
|
+
testCaseKey: 'M14-T6',
|
|
436
|
+
projectId: 10315,
|
|
437
|
+
parameters: [
|
|
438
|
+
{ index: 0, name: 'param1', defaultValue: 'value1' },
|
|
439
|
+
{ index: 1, name: 'param2', defaultValue: 'value2' }
|
|
440
|
+
]
|
|
441
|
+
});
|
|
520
442
|
|
|
521
|
-
//
|
|
522
|
-
await api.Private.
|
|
523
|
-
|
|
524
|
-
|
|
443
|
+
// Set test case to use Test Data
|
|
444
|
+
await api.Private.TestScriptData.setTestCaseParamTypeToTestData(credentials, {
|
|
445
|
+
testCaseKey: 'M14-T6',
|
|
446
|
+
projectId: 10315
|
|
525
447
|
});
|
|
526
448
|
|
|
527
|
-
//
|
|
528
|
-
await api.Private.
|
|
529
|
-
|
|
530
|
-
|
|
449
|
+
// Set test data (simplified array format)
|
|
450
|
+
await api.Private.TestScriptData.setTestCaseTestData(credentials, {
|
|
451
|
+
testCaseKey: 'M14-T6',
|
|
452
|
+
projectId: 10315,
|
|
453
|
+
testData: [
|
|
454
|
+
// Row 1
|
|
455
|
+
[
|
|
456
|
+
{ columnName: 'Dataset Column', type: 'data_set', index: 0, dataSetItemId: 936037 },
|
|
457
|
+
{ columnName: 'Custom Column', type: 'free_text_input', index: 1, value: 'test value' }
|
|
458
|
+
]
|
|
459
|
+
]
|
|
531
460
|
});
|
|
461
|
+
```
|
|
532
462
|
|
|
533
|
-
|
|
463
|
+
### Test Executions with Test Data
|
|
534
464
|
|
|
535
|
-
|
|
536
|
-
await api.Private.TestCaseArchiving.unarchiveTestCases(credentials, {
|
|
537
|
-
projectId: 10316,
|
|
538
|
-
testCaseIds: [288004503]
|
|
539
|
-
});
|
|
465
|
+
The public API does not correctly handle creating test executions for test cases with test data or test cases with "Call to Test" steps that reference test cases with test data. Use `TestExecutions` to create and update these executions.
|
|
540
466
|
|
|
541
|
-
|
|
542
|
-
|
|
543
|
-
|
|
544
|
-
|
|
467
|
+
```typescript
|
|
468
|
+
// Create test execution for test case with test data
|
|
469
|
+
// This automatically handles the two-step process:
|
|
470
|
+
// 1. Creates execution via public API
|
|
471
|
+
// 2. Gets testRunItemId from private API
|
|
472
|
+
// 3. Creates actual execution via private API
|
|
473
|
+
const execution = await api.Private.TestExecutions.createTestExecutionWithTestData(credentials, {
|
|
474
|
+
testCaseKey: 'M14-T6',
|
|
475
|
+
testCycleKey: 'M14-R1',
|
|
476
|
+
assignedTo: '5d259f2e0b81c60c239bed83', // optional
|
|
477
|
+
projectId: 10315
|
|
478
|
+
});
|
|
479
|
+
// Returns: { id: 2065132733, key: 'M14-E18' }
|
|
480
|
+
|
|
481
|
+
// Get test cycle items (to find testRunItemId for a test case)
|
|
482
|
+
const items = await api.Private.TestExecutions.getTestCycleItems(credentials, {
|
|
483
|
+
testCycleKey: 'M14-R1',
|
|
484
|
+
projectId: 10315
|
|
485
|
+
});
|
|
486
|
+
|
|
487
|
+
// Update parent test execution
|
|
488
|
+
await api.Private.TestExecutions.updateTestExecution(credentials, {
|
|
489
|
+
testExecutionKey: 'M14-E18',
|
|
490
|
+
id: 2065132733, // Optional if testExecutionKey is provided
|
|
491
|
+
actualStartDate: '2025-12-24T13:02:50.233Z',
|
|
492
|
+
executionDate: '2025-12-24T13:02:50.233Z',
|
|
493
|
+
executionTime: 0,
|
|
494
|
+
testResultStatusId: 10952941,
|
|
495
|
+
projectId: 10315
|
|
496
|
+
});
|
|
497
|
+
|
|
498
|
+
// Get test execution steps (to get step IDs for updates)
|
|
499
|
+
const steps = await api.Private.TestExecutions.getTestExecutionSteps(credentials, {
|
|
500
|
+
testCycleKey: 'M14-R1',
|
|
501
|
+
testRunItemId: 1443476310, // From getTestCycleItems
|
|
502
|
+
projectId: 10315
|
|
503
|
+
});
|
|
504
|
+
|
|
505
|
+
// Update test execution step status
|
|
506
|
+
await api.Private.TestExecutions.updateTestExecutionStepStatus(credentials, {
|
|
507
|
+
id: 6287896613, // From getTestExecutionSteps
|
|
508
|
+
testResultStatusId: 10952942,
|
|
509
|
+
executionDate: '2025-12-24T13:02:50.232Z',
|
|
510
|
+
projectId: 10315
|
|
511
|
+
});
|
|
512
|
+
|
|
513
|
+
// Update test execution step comment (actual result)
|
|
514
|
+
await api.Private.TestExecutions.updateTestExecutionStepComment(credentials, {
|
|
515
|
+
id: 6287896613, // From getTestExecutionSteps
|
|
516
|
+
comment: 'Test passed successfully',
|
|
517
|
+
projectId: 10315
|
|
545
518
|
});
|
|
546
519
|
```
|
|
547
520
|
|
|
548
|
-
**
|
|
549
|
-
|
|
550
|
-
|
|
551
|
-
-
|
|
552
|
-
- The Context JWT token expires after 15 minutes and must be retrieved for each private API call
|
|
553
|
-
- All private API methods automatically handle Context JWT retrieval internally
|
|
554
|
-
- Methods that accept keys (like `testCaseKey`) automatically look up numeric IDs when needed
|
|
521
|
+
**Notes:**
|
|
522
|
+
- Version numbers are absolute (1-based). Use `listTestCaseVersions()` to find available versions. If `version` is not provided, the latest version is used.
|
|
523
|
+
- Private API methods require `PrivateApiCredentials` (`userEmail`, `apiToken`, `jiraInstanceUrl`). Context JWT tokens expire after 15 minutes and are automatically retrieved internally.
|
|
524
|
+
- Methods accept keys (e.g., `testCaseKey`) and automatically look up numeric IDs when needed.
|
|
555
525
|
|
|
556
526
|
## Contact
|
|
557
527
|
|
|
@@ -559,6 +529,29 @@ Feel free to drop ideas, suggestions or improvements into our [Community hub](ht
|
|
|
559
529
|
|
|
560
530
|
## Changelog
|
|
561
531
|
|
|
532
|
+
### 1.3.10
|
|
533
|
+
|
|
534
|
+
- **Added**: New `TestScriptData` sub-group under Private API for managing test script data (Parameters and Test Data)
|
|
535
|
+
- **Added**: `setTestCaseParamTypeToParameter()` - Set test case param type to Parameter
|
|
536
|
+
- **Added**: `setTestCaseParameters()` - Set parameters array for a test case
|
|
537
|
+
- **Added**: `setTestCaseParamTypeToTestData()` - Set test case param type to Test Data
|
|
538
|
+
- **Added**: `setTestCaseTestData()` - Set test data array for a test case (simplified array format)
|
|
539
|
+
- **Added**: `getTestCaseTestData()` - Get test script data (paramType, parameters, testData) for a test case
|
|
540
|
+
- **Added**: `hasTestCaseTestData()` - Check if test case has test script data (Parameters or Test Data)
|
|
541
|
+
- **Added**: New `TestExecutions` sub-group under Private API for creating and updating test executions for test cases with test data
|
|
542
|
+
- **Added**: `createTestExecutionWithTestData()` - Create test execution for test case with test data (handles full workflow automatically)
|
|
543
|
+
- **Added**: `getTestCycleItems()` - Get test cycle items (testRunItems) for a test cycle
|
|
544
|
+
- **Added**: `updateTestExecution()` - Update parent test execution information
|
|
545
|
+
- **Added**: `getTestExecutionSteps()` - Get test execution steps (returns only IDs and basic info needed for updates)
|
|
546
|
+
- **Added**: `updateTestExecutionStepStatus()` - Update test execution step status
|
|
547
|
+
- **Added**: `updateTestExecutionStepComment()` - Update test execution step comment (actual result)
|
|
548
|
+
- **Added**: `enableZephyrForProject()` - Enable Zephyr for a Jira project (under Authentication sub-group)
|
|
549
|
+
- **Added**: `isZephyrEnabledForProject()` - Check if Zephyr is enabled for a Jira project (under Authentication sub-group)
|
|
550
|
+
|
|
551
|
+
### 1.3.9
|
|
552
|
+
|
|
553
|
+
- **Changed**: Readme fixes
|
|
554
|
+
|
|
562
555
|
### 1.3.8
|
|
563
556
|
|
|
564
557
|
- **Added**: `getTestExecutionVersion()` - Get Jira version ID (release version) for a test execution (supplements public `getTestExecution()`)
|