zephyr-enterprise-tools 1.2.7 → 1.3.0
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 +126 -76
- package/cli.js +63 -0
- package/mcp-server.js +63 -0
- package/package.json +1 -1
- package/zephyr-enterprise-tools.d.ts +124 -0
- package/zephyr-enterprise-tools.js +484 -48
package/README.md
CHANGED
|
@@ -1,6 +1,8 @@
|
|
|
1
1
|
# Zephyr Enterprise Tools
|
|
2
2
|
|
|
3
|
-
Comprehensive tools for Zephyr Enterprise
|
|
3
|
+
Comprehensive tools for Zephyr Enterprise — Release Readiness, Project Health, Test Analytics & More.
|
|
4
|
+
|
|
5
|
+
---
|
|
4
6
|
|
|
5
7
|
## 🛠️ Available Tools
|
|
6
8
|
|
|
@@ -10,30 +12,30 @@ Comprehensive tools for Zephyr Enterprise - Release Readiness, Project Health, T
|
|
|
10
12
|
|------|-------------|------------|
|
|
11
13
|
| `release-readiness` | Run all 4 quality gates | Combined assessment |
|
|
12
14
|
| `requirement-coverage` | Are requirements covered by tests? | ≥70% = GO |
|
|
13
|
-
| `test-plan` | Are tests planned and assigned? | <80% = NO GO, 80
|
|
14
|
-
| `test-execution` | Have tests been executed? | <90% = NO GO, 90
|
|
15
|
-
| `defect-quality` | Are critical defects resolved? | Blocker >0 = NO GO, High-risk >10 = NO GO |
|
|
15
|
+
| `test-plan` | Are tests planned and assigned? | <80% = NO GO, 80–90% = CONDITIONAL, ≥90% = GO |
|
|
16
|
+
| `test-execution` | Have tests been executed? | <90% = NO GO, 90–97% = CONDITIONAL, ≥97% = GO |
|
|
17
|
+
| `defect-quality` | Are critical defects resolved? | Blocker > 0 = NO GO, High-risk > 10 = NO GO |
|
|
16
18
|
|
|
17
19
|
### 📊 Analytics & Insights
|
|
18
20
|
|
|
19
21
|
| Tool | Description |
|
|
20
22
|
|------|-------------|
|
|
21
|
-
| `project-health` | Overall project health score (0
|
|
23
|
+
| `project-health` | Overall project health score (0–100) with status |
|
|
22
24
|
| `test-coverage` | Detailed test coverage analysis |
|
|
23
25
|
| `failed-tests` | List and analyze failed tests |
|
|
24
26
|
| `req-coverage` | Requirements with/without test coverage |
|
|
25
27
|
| `test-trends` | Test execution trends over time |
|
|
26
|
-
| `search-tests` | Search test cases by query |
|
|
28
|
+
| `search-tests` | Search test cases by keyword query |
|
|
27
29
|
| `user-activity` | User activity and productivity metrics |
|
|
28
|
-
| `user-trend` | Full audit log history for a user — every action across the system |
|
|
29
|
-
| `execution-burndown` | Day-by-day execution burndown (remaining vs ideal) |
|
|
30
|
+
| `user-trend` | Full audit log history for a user — every action across the system, filterable by date range, entity type, and operation |
|
|
31
|
+
| `execution-burndown` | Day-by-day execution burndown (remaining vs ideal), supports optional date range filtering |
|
|
30
32
|
|
|
31
33
|
---
|
|
32
34
|
|
|
33
35
|
## 📦 Installation
|
|
34
36
|
|
|
35
37
|
```bash
|
|
36
|
-
# Install
|
|
38
|
+
# Install globally
|
|
37
39
|
npm install -g zephyr-enterprise-tools
|
|
38
40
|
|
|
39
41
|
# Or install locally
|
|
@@ -55,27 +57,35 @@ export ZEPHYR_TOKEN="your-api-token"
|
|
|
55
57
|
|
|
56
58
|
## 🤖 MCP Integration
|
|
57
59
|
|
|
58
|
-
Use zephyr-enterprise-tools as an MCP (Model Context Protocol) server with your AI assistant. The server only requires `ZEPHYR_BASE_URL` and `ZEPHYR_TOKEN` at startup
|
|
60
|
+
Use `zephyr-enterprise-tools` as an MCP (Model Context Protocol) server with your AI assistant. The server only requires `ZEPHYR_BASE_URL` and `ZEPHYR_TOKEN` at startup — **Project ID and Release ID are passed as parameters when calling each tool**.
|
|
59
61
|
|
|
60
62
|
### Available MCP Tools
|
|
61
63
|
|
|
62
|
-
| Tool | Description |
|
|
63
|
-
|
|
64
|
-
| `list_projects` | List all Zephyr projects
|
|
65
|
-
| `list_releases` | List releases for a project
|
|
66
|
-
| `release_readiness` | Run all 4 quality gates |
|
|
67
|
-
| `requirement_coverage` | Check requirement coverage |
|
|
68
|
-
| `test_plan_analysis` | Analyze test planning status |
|
|
69
|
-
| `test_execution` | Check test execution progress |
|
|
70
|
-
| `defect_quality` | Analyze defect status |
|
|
71
|
-
| `project_health` | Get project health score |
|
|
72
|
-
| `test_coverage` | Get test coverage details |
|
|
73
|
-
| `failed_tests` | List failed tests |
|
|
74
|
-
| `test_trends` | Get execution trends over time |
|
|
75
|
-
| `search_test_cases` | Search test cases by
|
|
76
|
-
| `user_activity` | Get user activity metrics |
|
|
77
|
-
| `user_trend` |
|
|
78
|
-
| `execution_burndown` | Day-by-day
|
|
64
|
+
| Tool | Parameters | Description |
|
|
65
|
+
|------|-----------|-------------|
|
|
66
|
+
| `list_projects` | _(none)_ | List all Zephyr projects |
|
|
67
|
+
| `list_releases` | `projectId` | List releases for a project |
|
|
68
|
+
| `release_readiness` | `projectId`, `releaseId` | Run all 4 quality gates |
|
|
69
|
+
| `requirement_coverage` | `projectId`, `releaseId` | Check requirement coverage |
|
|
70
|
+
| `test_plan_analysis` | `projectId`, `releaseId`, `query?` _(ZQL)_ | Analyze test planning status — supports ZQL filter e.g. `priority = "P1"` |
|
|
71
|
+
| `test_execution` | `projectId`, `releaseId` | Check test execution progress |
|
|
72
|
+
| `defect_quality` | `projectId`, `releaseId` | Analyze defect status |
|
|
73
|
+
| `project_health` | `projectId`, `releaseId` | Get project health score |
|
|
74
|
+
| `test_coverage` | `projectId`, `releaseId` | Get test coverage details |
|
|
75
|
+
| `failed_tests` | `projectId`, `releaseId`, `limit?` | List failed tests |
|
|
76
|
+
| `test_trends` | `projectId`, `releaseId`, `days?` | Get execution trends over time |
|
|
77
|
+
| `search_test_cases` | `projectId`, `releaseId`, `query?`, `limit?` | Search test cases by keyword |
|
|
78
|
+
| `user_activity` | `projectId`, `releaseId`, `days?` | Get user activity metrics |
|
|
79
|
+
| `user_trend` | `userName`*, `fromDate?`, `toDate?`, `entity?`, `operation?`, `pageSize?`, `offset?` | Full audit log history for a user |
|
|
80
|
+
| `execution_burndown` | `projectId`, `releaseId`, `startDate?`, `endDate?` | Day-by-day burndown chart data |
|
|
81
|
+
|
|
82
|
+
> **\* `user_trend` — `userName` must be the user's full email address** (e.g. `jane.doe@yourcompany.com`). Short names or display names will return 0 results. `pageSize` supports up to 1000 records per request.
|
|
83
|
+
|
|
84
|
+
> **`test_plan_analysis` ZQL filter** — Use the `query` parameter to scope results to a specific priority, e.g. `priority = "P1"`. This is the recommended way to filter test plan metrics by priority. Note: `search_test_cases` accepts keyword queries but does not support ZQL priority filtering.
|
|
85
|
+
|
|
86
|
+
> **`execution_burndown` date range** — Use `startDate` and `endDate` (format: `YYYY-MM-DD`) to scope the burndown to a specific period within the release window.
|
|
87
|
+
|
|
88
|
+
---
|
|
79
89
|
|
|
80
90
|
### Claude Desktop
|
|
81
91
|
|
|
@@ -149,56 +159,69 @@ Add to your `mcp.json` configuration:
|
|
|
149
159
|
|
|
150
160
|
## 🖥️ CLI Usage
|
|
151
161
|
|
|
162
|
+
The CLI binary is `zephyr-enterprise-tools`:
|
|
163
|
+
|
|
152
164
|
```bash
|
|
153
165
|
# Run all quality gates (release readiness)
|
|
154
|
-
zephyr-tools -p <projectId> -r <releaseId>
|
|
166
|
+
zephyr-enterprise-tools -p <projectId> -r <releaseId>
|
|
167
|
+
|
|
168
|
+
# Run a specific tool
|
|
169
|
+
zephyr-enterprise-tools -p 364 -r 4312 -t project-health
|
|
170
|
+
zephyr-enterprise-tools -p 364 -r 4312 -t failed-tests
|
|
171
|
+
zephyr-enterprise-tools -p 364 -r 4312 -t user-activity
|
|
155
172
|
|
|
156
|
-
#
|
|
157
|
-
zephyr-tools -p 364 -r 4312 -t
|
|
158
|
-
zephyr-tools -p 364 -r 4312 -t failed-tests
|
|
159
|
-
zephyr-tools -p 364 -r 4312 -t user-activity
|
|
173
|
+
# Search test cases by keyword
|
|
174
|
+
zephyr-enterprise-tools -p 364 -r 4312 -t search-tests -q "login"
|
|
160
175
|
|
|
161
|
-
#
|
|
162
|
-
zephyr-tools -p 364 -r 4312 -t
|
|
176
|
+
# Test plan analysis filtered to P1 priority (ZQL)
|
|
177
|
+
zephyr-enterprise-tools -p 364 -r 4312 -t test-plan -q 'priority = "P1"'
|
|
163
178
|
|
|
164
179
|
# Get trends for last 14 days
|
|
165
|
-
zephyr-tools -p 364 -r 4312 -t test-trends -d 14
|
|
180
|
+
zephyr-enterprise-tools -p 364 -r 4312 -t test-trends -d 14
|
|
181
|
+
|
|
182
|
+
# Get user audit log (full email required)
|
|
183
|
+
zephyr-enterprise-tools -t user-trend --user jane.doe@yourcompany.com --page-size 1000
|
|
166
184
|
|
|
167
185
|
# JSON output (for CI/CD)
|
|
168
|
-
zephyr-tools -p 364 -r 4312 --json
|
|
186
|
+
zephyr-enterprise-tools -p 364 -r 4312 --json
|
|
169
187
|
|
|
170
188
|
# Help
|
|
171
|
-
zephyr-tools --help
|
|
189
|
+
zephyr-enterprise-tools --help
|
|
172
190
|
```
|
|
173
191
|
|
|
174
192
|
### CLI Options
|
|
175
193
|
|
|
176
194
|
| Option | Description |
|
|
177
195
|
|--------|-------------|
|
|
178
|
-
| `-p, --project <id>` | Project ID (required) |
|
|
179
|
-
| `-r, --release <id>` | Release ID (required) |
|
|
180
|
-
| `-t, --tool <name>` | Tool to run (default: release-readiness) |
|
|
181
|
-
| `-q, --query <text>` |
|
|
196
|
+
| `-p, --project <id>` | Project ID (required for most tools) |
|
|
197
|
+
| `-r, --release <id>` | Release ID (required for most tools) |
|
|
198
|
+
| `-t, --tool <name>` | Tool to run (default: `release-readiness`) |
|
|
199
|
+
| `-q, --query <text>` | Keyword query (for `search-tests`) or ZQL expression (for `test-plan`) |
|
|
182
200
|
| `-d, --days <n>` | Days for trends/activity (default: 30) |
|
|
183
201
|
| `-l, --limit <n>` | Max results (default: 50) |
|
|
202
|
+
| `--user <email>` | Full email address for `user-trend` |
|
|
203
|
+
| `--page-size <n>` | Records per page for `user-trend` (max: 1000) |
|
|
204
|
+
| `--start-date <YYYY-MM-DD>` | Start date for `execution-burndown` |
|
|
205
|
+
| `--end-date <YYYY-MM-DD>` | End date for `execution-burndown` |
|
|
184
206
|
| `--json` | Output as JSON |
|
|
185
207
|
| `-h, --help` | Show help |
|
|
186
208
|
|
|
187
209
|
### Exit Codes
|
|
188
|
-
|
|
189
|
-
|
|
190
|
-
|
|
210
|
+
|
|
211
|
+
| Code | Meaning |
|
|
212
|
+
|------|---------|
|
|
213
|
+
| `0` | GO / Healthy |
|
|
214
|
+
| `1` | CONDITIONAL GO / At Risk |
|
|
215
|
+
| `2` | NO GO / Critical |
|
|
191
216
|
|
|
192
217
|
---
|
|
193
218
|
|
|
194
219
|
## 📚 Programmatic Usage
|
|
195
220
|
|
|
196
221
|
```javascript
|
|
197
|
-
import
|
|
198
|
-
// Or with the new filename:
|
|
199
|
-
// import ZephyrTools from './zephyr-enterprise-tools.js';
|
|
222
|
+
import ZephyrEnterpriseTools from 'zephyr-enterprise-tools';
|
|
200
223
|
|
|
201
|
-
const tools = new
|
|
224
|
+
const tools = new ZephyrEnterpriseTools({
|
|
202
225
|
baseUrl: 'https://your-zephyr.com/flex/services/rest/latest',
|
|
203
226
|
token: 'your-api-token',
|
|
204
227
|
});
|
|
@@ -208,21 +231,36 @@ const report = await tools.runAllGates(364, 4312);
|
|
|
208
231
|
console.log(report.overallStatus); // "GO" | "CONDITIONAL GO" | "NO GO"
|
|
209
232
|
|
|
210
233
|
// Individual gates
|
|
211
|
-
const coverage
|
|
212
|
-
const planning
|
|
234
|
+
const coverage = await tools.requirementCoverageGate(364, 4312);
|
|
235
|
+
const planning = await tools.testPlanAnalysisGate(364, 4312);
|
|
236
|
+
const planningP1 = await tools.testPlanAnalysisGate(364, 4312, { query: 'priority = "P1"' });
|
|
213
237
|
const execution = await tools.testExecutionGate(364, 4312);
|
|
214
|
-
const defects
|
|
238
|
+
const defects = await tools.defectQualityGate(364, 4312);
|
|
215
239
|
|
|
216
240
|
// ── Analytics & Insights ───────────────────────────────────
|
|
217
|
-
const health
|
|
218
|
-
console.log(health.healthScore); // 0
|
|
241
|
+
const health = await tools.getProjectHealth(364, 4312);
|
|
242
|
+
console.log(health.healthScore); // 0–100
|
|
219
243
|
|
|
220
|
-
const coverage
|
|
221
|
-
const failed
|
|
244
|
+
const coverage = await tools.getTestCoverage(364, 4312);
|
|
245
|
+
const failed = await tools.getFailedTests(364, 4312, { limit: 20 });
|
|
222
246
|
const reqCoverage = await tools.getRequirementCoverage(364, 4312);
|
|
223
|
-
const trends
|
|
224
|
-
const results
|
|
225
|
-
const activity
|
|
247
|
+
const trends = await tools.getTestCaseTrends(364, 4312, { days: 14 });
|
|
248
|
+
const results = await tools.searchTestCases(364, 4312, { query: 'login' });
|
|
249
|
+
const activity = await tools.getUserActivity(364, 4312, { days: 30 });
|
|
250
|
+
|
|
251
|
+
// User audit log — full email address required; pageSize up to 1000
|
|
252
|
+
const auditLog = await tools.getUserTrend({
|
|
253
|
+
userName: 'jane.doe@yourcompany.com',
|
|
254
|
+
fromDate: '2026-07-01',
|
|
255
|
+
toDate: '2026-08-01',
|
|
256
|
+
pageSize: 1000,
|
|
257
|
+
});
|
|
258
|
+
|
|
259
|
+
// Burndown with optional date range
|
|
260
|
+
const burndown = await tools.getExecutionBurndown(364, 4312, {
|
|
261
|
+
startDate: '2026-07-22',
|
|
262
|
+
endDate: '2026-08-27',
|
|
263
|
+
});
|
|
226
264
|
```
|
|
227
265
|
|
|
228
266
|
---
|
|
@@ -230,6 +268,7 @@ const activity = await tools.getUserActivity(364, 4312, { days: 30 });
|
|
|
230
268
|
## 📊 Sample Outputs
|
|
231
269
|
|
|
232
270
|
### Release Readiness Report
|
|
271
|
+
|
|
233
272
|
```
|
|
234
273
|
════════════════════════════════════════════════════════════════════════════════
|
|
235
274
|
RELEASE READINESS REPORT
|
|
@@ -237,19 +276,20 @@ const activity = await tools.getUserActivity(364, 4312, { days: 30 });
|
|
|
237
276
|
Project: 364 | Release: 4312 | 2026-08-12T10:30:00.000Z
|
|
238
277
|
────────────────────────────────────────────────────────────────────────────────
|
|
239
278
|
|
|
240
|
-
|
|
241
|
-
│ Gate │ Score │ Status
|
|
242
|
-
|
|
243
|
-
│ Requirement Coverage │ 37.04% │ 🔴 NO GO
|
|
244
|
-
│ Test Plan Analysis │ 19.53% │ 🔴 NO GO
|
|
245
|
-
│ Test Execution │ 80% │ 🔴 NO GO
|
|
246
|
-
│ Defect Quality │ 0B/0H
|
|
247
|
-
|
|
279
|
+
┌─────────────────────────┬──────────┬──────────────────┬─────────────────────────┐
|
|
280
|
+
│ Gate │ Score │ Status │ Threshold │
|
|
281
|
+
├─────────────────────────┼──────────┼──────────────────┼─────────────────────────┤
|
|
282
|
+
│ Requirement Coverage │ 37.04% │ 🔴 NO GO │ ≥70% coverage │
|
|
283
|
+
│ Test Plan Analysis │ 19.53% │ 🔴 NO GO │ ≥90% planned & assigned │
|
|
284
|
+
│ Test Execution │ 80% │ 🔴 NO GO │ ≥97% executed │
|
|
285
|
+
│ Defect Quality │ 0B / 0H │ 🟢 GO │ 0 blockers, ≤10 high │
|
|
286
|
+
└─────────────────────────┴──────────┴──────────────────┴─────────────────────────┘
|
|
248
287
|
|
|
249
288
|
OVERALL: 🔴 NO GO (1/4 passed, 3 failed, 0 conditional)
|
|
250
289
|
```
|
|
251
290
|
|
|
252
291
|
### Project Health
|
|
292
|
+
|
|
253
293
|
```
|
|
254
294
|
══════════════════════════════════════════════════════════════════════
|
|
255
295
|
PROJECT HEALTH
|
|
@@ -268,6 +308,7 @@ Health Score: 🟡 65/100 (MODERATE)
|
|
|
268
308
|
```
|
|
269
309
|
|
|
270
310
|
### User Activity
|
|
311
|
+
|
|
271
312
|
```
|
|
272
313
|
══════════════════════════════════════════════════════════════════════
|
|
273
314
|
USER ACTIVITY
|
|
@@ -295,11 +336,10 @@ Health Score: 🟡 65/100 (MODERATE)
|
|
|
295
336
|
```yaml
|
|
296
337
|
- name: Check Release Readiness
|
|
297
338
|
env:
|
|
298
|
-
ZEPHYR_BASE_URL: ${{ secrets.
|
|
299
|
-
|
|
300
|
-
ZEPHYR_PASSWORD: ${{ secrets.ZEPHYR_PASS }}
|
|
339
|
+
ZEPHYR_BASE_URL: ${{ secrets.ZEPHYR_BASE_URL }}
|
|
340
|
+
ZEPHYR_TOKEN: ${{ secrets.ZEPHYR_TOKEN }}
|
|
301
341
|
run: |
|
|
302
|
-
npx zephyr-
|
|
342
|
+
npx zephyr-enterprise-tools -p ${{ vars.PROJECT_ID }} -r ${{ vars.RELEASE_ID }} --json > report.json
|
|
303
343
|
cat report.json
|
|
304
344
|
```
|
|
305
345
|
|
|
@@ -308,12 +348,11 @@ Health Score: 🟡 65/100 (MODERATE)
|
|
|
308
348
|
```groovy
|
|
309
349
|
stage('Quality Gates') {
|
|
310
350
|
environment {
|
|
311
|
-
ZEPHYR_BASE_URL = credentials('zephyr-url')
|
|
312
|
-
|
|
313
|
-
ZEPHYR_PASSWORD = credentials('zephyr-pass')
|
|
351
|
+
ZEPHYR_BASE_URL = credentials('zephyr-base-url')
|
|
352
|
+
ZEPHYR_TOKEN = credentials('zephyr-token')
|
|
314
353
|
}
|
|
315
354
|
steps {
|
|
316
|
-
sh '
|
|
355
|
+
sh 'npx zephyr-enterprise-tools -p ${PROJECT_ID} -r ${RELEASE_ID}'
|
|
317
356
|
}
|
|
318
357
|
}
|
|
319
358
|
```
|
|
@@ -327,7 +366,7 @@ Edit `quality-gates.js`:
|
|
|
327
366
|
```javascript
|
|
328
367
|
export const THRESHOLDS = {
|
|
329
368
|
requirementCoverage: {
|
|
330
|
-
go: 70,
|
|
369
|
+
go: 70, // Raise to 80 for stricter coverage requirements
|
|
331
370
|
},
|
|
332
371
|
testPlanAnalysis: {
|
|
333
372
|
noGo: 80,
|
|
@@ -339,13 +378,24 @@ export const THRESHOLDS = {
|
|
|
339
378
|
},
|
|
340
379
|
defectQuality: {
|
|
341
380
|
blockerLimit: 0,
|
|
342
|
-
highRiskLimit: 10,
|
|
381
|
+
highRiskLimit: 10, // Lower to 5 for a stricter defect policy
|
|
343
382
|
}
|
|
344
383
|
};
|
|
345
384
|
```
|
|
346
385
|
|
|
347
386
|
---
|
|
348
387
|
|
|
388
|
+
## 🐛 Common Issues
|
|
389
|
+
|
|
390
|
+
| Problem | Cause | Fix |
|
|
391
|
+
|---------|-------|-----|
|
|
392
|
+
| `user_trend` returns 0 results | `userName` is not the full email address | Use full email e.g. `jane.doe@company.com` |
|
|
393
|
+
| `search_test_cases` returns no results for `priority = "P1"` | `search_test_cases` does not support ZQL priority filters | Use `test_plan_analysis` with `query: 'priority = "P1"'` instead |
|
|
394
|
+
| Auth failure in CI/CD | Using old `ZEPHYR_USERNAME` / `ZEPHYR_PASSWORD` env vars | Replace with `ZEPHYR_TOKEN` |
|
|
395
|
+
| Burndown shows wrong date range | No date range specified — defaults to full release window | Pass `startDate` and `endDate` to scope the burndown |
|
|
396
|
+
|
|
397
|
+
---
|
|
398
|
+
|
|
349
399
|
## 📄 License
|
|
350
400
|
|
|
351
401
|
MIT
|
package/cli.js
CHANGED
|
@@ -42,6 +42,7 @@ function parseArgs() {
|
|
|
42
42
|
query: '',
|
|
43
43
|
days: 30,
|
|
44
44
|
limit: 50,
|
|
45
|
+
cycleId: null,
|
|
45
46
|
};
|
|
46
47
|
|
|
47
48
|
for (let i = 0; i < args.length; i++) {
|
|
@@ -76,6 +77,10 @@ function parseArgs() {
|
|
|
76
77
|
case '--limit':
|
|
77
78
|
options.limit = parseInt(args[++i], 10) || 50;
|
|
78
79
|
break;
|
|
80
|
+
case '-c':
|
|
81
|
+
case '--cycle':
|
|
82
|
+
options.cycleId = Number(args[++i]);
|
|
83
|
+
break;
|
|
79
84
|
case '--json':
|
|
80
85
|
options.format = 'json';
|
|
81
86
|
break;
|
|
@@ -117,6 +122,7 @@ OPTIONS:
|
|
|
117
122
|
-q, --query <text> Search query (for search-tests)
|
|
118
123
|
-d, --days <n> Number of days for trends/activity (default: 30)
|
|
119
124
|
-l, --limit <n> Max results to return (default: 50)
|
|
125
|
+
-c, --cycle <id> Cycle ID (for get-cycle)
|
|
120
126
|
--json Output as JSON
|
|
121
127
|
--table Output as table (default)
|
|
122
128
|
-h, --help Show this help
|
|
@@ -140,6 +146,8 @@ AVAILABLE TOOLS:
|
|
|
140
146
|
│ test-trends Test execution trends over time │
|
|
141
147
|
│ search-tests Search test cases by query │
|
|
142
148
|
│ user-activity User activity and productivity metrics │
|
|
149
|
+
│ list-cycles List all cycles for a release with phase details │
|
|
150
|
+
│ get-cycle Get full details for one cycle (-c <cycleId>) │
|
|
143
151
|
└─────────────────────────────────────────────────────────────────────────────┘
|
|
144
152
|
|
|
145
153
|
ENVIRONMENT VARIABLES:
|
|
@@ -165,6 +173,12 @@ EXAMPLES:
|
|
|
165
173
|
# Get user activity report
|
|
166
174
|
zephyr-tools -p 364 -r 4312 -t user-activity
|
|
167
175
|
|
|
176
|
+
# List all cycles and phase details for a release
|
|
177
|
+
zephyr-tools -p 364 -r 4312 -t list-cycles
|
|
178
|
+
|
|
179
|
+
# Get a single cycle detail
|
|
180
|
+
zephyr-tools -p 364 -r 4312 -t get-cycle -c 98765
|
|
181
|
+
|
|
168
182
|
QUALITY GATE THRESHOLDS:
|
|
169
183
|
Requirement Coverage: ≥70% = GO
|
|
170
184
|
Test Plan Analysis: <80% = NO GO, 80-90% = CONDITIONAL, ≥90% = GO
|
|
@@ -412,6 +426,16 @@ function formatGenericResult(result) {
|
|
|
412
426
|
}
|
|
413
427
|
console.log(' └────────────┴───────┴────────┴────────┴─────────┘');
|
|
414
428
|
}
|
|
429
|
+
|
|
430
|
+
// Cycles list/detail
|
|
431
|
+
if (result.cycles && result.cycles.length > 0) {
|
|
432
|
+
console.log(`\n🔁 CYCLES (${result.total || result.cycles.length}):`);
|
|
433
|
+
for (const cycle of result.cycles) {
|
|
434
|
+
printCycleDetail(cycle);
|
|
435
|
+
}
|
|
436
|
+
} else if (result.tool === 'Get Cycle' || result.cycleId) {
|
|
437
|
+
printCycleDetail(result);
|
|
438
|
+
}
|
|
415
439
|
|
|
416
440
|
// Recommendations
|
|
417
441
|
if (result.recommendations) {
|
|
@@ -449,6 +473,35 @@ function formatKey(key) {
|
|
|
449
473
|
.trim();
|
|
450
474
|
}
|
|
451
475
|
|
|
476
|
+
function printCycleDetail(cycle) {
|
|
477
|
+
console.log(` • ${cycle.name || 'Unnamed Cycle'} [ID: ${cycle.id || cycle.cycleId}]`);
|
|
478
|
+
if (cycle.environment || cycle.build || cycle.status) {
|
|
479
|
+
console.log(` Environment: ${cycle.environment || 'N/A'} | Build: ${cycle.build || 'N/A'} | Status: ${cycle.status || 'N/A'}`);
|
|
480
|
+
}
|
|
481
|
+
if (cycle.startDate || cycle.endDate) {
|
|
482
|
+
console.log(` Dates: ${cycle.startDate || 'N/A'} → ${cycle.endDate || 'N/A'}`);
|
|
483
|
+
}
|
|
484
|
+
if (cycle.executionStatusCounts?.breakdown?.length) {
|
|
485
|
+
const breakdown = cycle.executionStatusCounts.breakdown
|
|
486
|
+
.map(item => `${item.label}: ${item.count}`)
|
|
487
|
+
.join(', ');
|
|
488
|
+
console.log(` Execution Status: total ${cycle.executionStatusCounts.total}; ${breakdown}`);
|
|
489
|
+
}
|
|
490
|
+
if (cycle.phases?.length) {
|
|
491
|
+
console.log(` Phases (${cycle.phases.length}):`);
|
|
492
|
+
for (const phase of cycle.phases) {
|
|
493
|
+
const dates = phase.startDate || phase.endDate ? ` (${phase.startDate || 'N/A'} → ${phase.endDate || 'N/A'})` : '';
|
|
494
|
+
console.log(` - ${phase.name || 'Unnamed Phase'} [ID: ${phase.id}]${dates}`);
|
|
495
|
+
if (phase.executionStatusCounts?.breakdown?.length) {
|
|
496
|
+
const breakdown = phase.executionStatusCounts.breakdown
|
|
497
|
+
.map(item => `${item.label}: ${item.count}`)
|
|
498
|
+
.join(', ');
|
|
499
|
+
console.log(` Execution Status: total ${phase.executionStatusCounts.total}; ${breakdown}`);
|
|
500
|
+
}
|
|
501
|
+
}
|
|
502
|
+
}
|
|
503
|
+
}
|
|
504
|
+
|
|
452
505
|
// ─── Main ─────────────────────────────────────────────────────────────────────
|
|
453
506
|
|
|
454
507
|
async function main() {
|
|
@@ -515,6 +568,16 @@ async function main() {
|
|
|
515
568
|
case 'user-activity':
|
|
516
569
|
result = await tools.getUserActivity(projectId, releaseId, { days });
|
|
517
570
|
break;
|
|
571
|
+
case 'list-cycles':
|
|
572
|
+
result = await tools.listCycles(releaseId);
|
|
573
|
+
break;
|
|
574
|
+
case 'get-cycle':
|
|
575
|
+
if (!options.cycleId) {
|
|
576
|
+
console.error('Error: --cycle is required for get-cycle.');
|
|
577
|
+
process.exit(1);
|
|
578
|
+
}
|
|
579
|
+
result = await tools.getCycle(options.cycleId);
|
|
580
|
+
break;
|
|
518
581
|
|
|
519
582
|
default:
|
|
520
583
|
console.error(`Unknown tool: ${tool}`);
|
package/mcp-server.js
CHANGED
|
@@ -31,6 +31,20 @@ const TOOLS = [
|
|
|
31
31
|
required: ['projectId', 'releaseId'],
|
|
32
32
|
},
|
|
33
33
|
},
|
|
34
|
+
{
|
|
35
|
+
name: 'compare_releases',
|
|
36
|
+
description: 'Run release readiness for two releases in the same project and return a side-by-side diff across all 4 gates, including which gate statuses changed and their metric deltas.',
|
|
37
|
+
inputSchema: {
|
|
38
|
+
type: 'object',
|
|
39
|
+
properties: {
|
|
40
|
+
projectId: { type: 'number', description: 'Zephyr project ID' },
|
|
41
|
+
releaseId1: { type: 'number', description: 'First (baseline) Zephyr release ID' },
|
|
42
|
+
releaseId2: { type: 'number', description: 'Second (comparison) Zephyr release ID' },
|
|
43
|
+
query: { type: 'string', description: 'Optional Zephyr ZQL expression for Test Plan Analysis, e.g. priority = "P1"' },
|
|
44
|
+
},
|
|
45
|
+
required: ['projectId', 'releaseId1', 'releaseId2'],
|
|
46
|
+
},
|
|
47
|
+
},
|
|
34
48
|
{
|
|
35
49
|
name: 'requirement_coverage',
|
|
36
50
|
description: 'Check if requirements are covered by test cases. Threshold: ≥70% = GO.',
|
|
@@ -220,6 +234,39 @@ const TOOLS = [
|
|
|
220
234
|
required: ['projectId'],
|
|
221
235
|
},
|
|
222
236
|
},
|
|
237
|
+
{
|
|
238
|
+
name: 'list_users',
|
|
239
|
+
description: 'List all users assigned to a project, with name, email, role, and account status.',
|
|
240
|
+
inputSchema: {
|
|
241
|
+
type: 'object',
|
|
242
|
+
properties: {
|
|
243
|
+
projectId: { type: 'number', description: 'Zephyr project ID' },
|
|
244
|
+
},
|
|
245
|
+
required: ['projectId'],
|
|
246
|
+
},
|
|
247
|
+
},
|
|
248
|
+
{
|
|
249
|
+
name: 'list_cycles',
|
|
250
|
+
description: 'List all test cycles for a release, including their phases and date ranges.',
|
|
251
|
+
inputSchema: {
|
|
252
|
+
type: 'object',
|
|
253
|
+
properties: {
|
|
254
|
+
releaseId: { type: 'number', description: 'Zephyr release ID' },
|
|
255
|
+
},
|
|
256
|
+
required: ['releaseId'],
|
|
257
|
+
},
|
|
258
|
+
},
|
|
259
|
+
{
|
|
260
|
+
name: 'get_cycle',
|
|
261
|
+
description: 'Get full detail for a single test cycle, including its phases.',
|
|
262
|
+
inputSchema: {
|
|
263
|
+
type: 'object',
|
|
264
|
+
properties: {
|
|
265
|
+
cycleId: { type: 'number', description: 'Zephyr cycle ID' },
|
|
266
|
+
},
|
|
267
|
+
required: ['cycleId'],
|
|
268
|
+
},
|
|
269
|
+
},
|
|
223
270
|
];
|
|
224
271
|
|
|
225
272
|
// ─── MCP Server ───────────────────────────────────────────────────────────────
|
|
@@ -269,6 +316,10 @@ server.setRequestHandler(CallToolRequestSchema, async (request) => {
|
|
|
269
316
|
result = await tools.runAllGates(projectId, releaseId, { query: args.query });
|
|
270
317
|
break;
|
|
271
318
|
|
|
319
|
+
case 'compare_releases':
|
|
320
|
+
result = await tools.compareReleases(projectId, args.releaseId1, args.releaseId2, { query: args.query });
|
|
321
|
+
break;
|
|
322
|
+
|
|
272
323
|
case 'requirement_coverage':
|
|
273
324
|
result = await tools.requirementCoverageGate(projectId, releaseId);
|
|
274
325
|
break;
|
|
@@ -363,6 +414,18 @@ server.setRequestHandler(CallToolRequestSchema, async (request) => {
|
|
|
363
414
|
})),
|
|
364
415
|
};
|
|
365
416
|
break;
|
|
417
|
+
|
|
418
|
+
case 'list_users':
|
|
419
|
+
result = await tools.listUsers(projectId);
|
|
420
|
+
break;
|
|
421
|
+
|
|
422
|
+
case 'list_cycles':
|
|
423
|
+
result = await tools.listCycles(releaseId);
|
|
424
|
+
break;
|
|
425
|
+
|
|
426
|
+
case 'get_cycle':
|
|
427
|
+
result = await tools.getCycle(args.cycleId);
|
|
428
|
+
break;
|
|
366
429
|
|
|
367
430
|
default:
|
|
368
431
|
return {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "zephyr-enterprise-tools",
|
|
3
|
-
"version": "1.
|
|
3
|
+
"version": "1.3.0",
|
|
4
4
|
"description": "Comprehensive Zephyr Enterprise Tools - Release Readiness, Project Health, Test Analytics & More",
|
|
5
5
|
"main": "zephyr-enterprise-tools.js",
|
|
6
6
|
"types": "zephyr-enterprise-tools.d.ts",
|