zephyr-enterprise-tools 1.2.7 → 1.2.8

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.
Files changed (2) hide show
  1. package/README.md +126 -76
  2. package/package.json +1 -1
package/README.md CHANGED
@@ -1,6 +1,8 @@
1
1
  # Zephyr Enterprise Tools
2
2
 
3
- Comprehensive tools for Zephyr Enterprise - Release Readiness, Project Health, Test Analytics & More.
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-90% = CONDITIONAL, ≥90% = GO |
14
- | `test-execution` | Have tests been executed? | <90% = NO GO, 90-97% = CONDITIONAL, ≥97% = GO |
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-100) with status |
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 from npm
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 - **Project ID and Release ID are passed as parameters when calling each tool**.
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 (no parameters needed) |
65
- | `list_releases` | List releases for a project (requires projectId) |
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 query |
76
- | `user_activity` | Get user activity metrics |
77
- | `user_trend` | Full audit log history for a user — filter by date range, entity type, and operation |
78
- | `execution_burndown` | Day-by-day execution burndown chart data (remaining vs ideal) |
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
- # Run specific tool
157
- zephyr-tools -p 364 -r 4312 -t project-health
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
- # Search test cases
162
- zephyr-tools -p 364 -r 4312 -t search-tests -q "login"
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>` | Search query (for search-tests) |
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
- - `0` = GO / Healthy
189
- - `1` = CONDITIONAL GO / At Risk
190
- - `2` = NO GO / Critical
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 QualityGates from 'zephyr-quality-gates';
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 QualityGates({
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 = await tools.requirementCoverageGate(364, 4312);
212
- const planning = await tools.testPlanAnalysisGate(364, 4312);
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 = await tools.defectQualityGate(364, 4312);
238
+ const defects = await tools.defectQualityGate(364, 4312);
215
239
 
216
240
  // ── Analytics & Insights ───────────────────────────────────
217
- const health = await tools.getProjectHealth(364, 4312);
218
- console.log(health.healthScore); // 0-100
241
+ const health = await tools.getProjectHealth(364, 4312);
242
+ console.log(health.healthScore); // 0–100
219
243
 
220
- const coverage = await tools.getTestCoverage(364, 4312);
221
- const failed = await tools.getFailedTests(364, 4312, { limit: 20 });
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 = await tools.getTestCaseTrends(364, 4312, { days: 14 });
224
- const results = await tools.searchTestCases(364, 4312, { query: 'login' });
225
- const activity = await tools.getUserActivity(364, 4312, { days: 30 });
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 │ Threshold │
242
- ├─────────────────────────┼──────────┼───────────┼─────────────────────────┤
243
- │ Requirement Coverage │ 37.04% │ 🔴 NO GO │ ≥70% coverage │
244
- │ Test Plan Analysis │ 19.53% │ 🔴 NO GO │ ≥90% planned & assigned │
245
- │ Test Execution │ 80% │ 🔴 NO GO │ ≥97% executed │
246
- │ Defect Quality │ 0B/0H │ 🟢 GO │ 0 blocker, ≤10 high │
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.ZEPHYR_URL }}
299
- ZEPHYR_USERNAME: ${{ secrets.ZEPHYR_USER }}
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-quality-gates -p ${{ vars.PROJECT_ID }} -r ${{ vars.RELEASE_ID }} --json > report.json
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
- ZEPHYR_USERNAME = credentials('zephyr-user')
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 'node quality-gates/cli.js -p ${PROJECT_ID} -r ${RELEASE_ID}'
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, // Change to 80 for stricter requirements
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, // Change to 5 for stricter defect policy
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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "zephyr-enterprise-tools",
3
- "version": "1.2.7",
3
+ "version": "1.2.8",
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",