@bugzy-ai/bugzy 1.17.0 → 1.18.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/dist/cli/index.cjs +52 -6
- package/dist/cli/index.cjs.map +1 -1
- package/dist/cli/index.js +52 -6
- package/dist/cli/index.js.map +1 -1
- package/dist/index.cjs +52 -6
- package/dist/index.cjs.map +1 -1
- package/dist/index.js +52 -6
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
- package/templates/playwright/reporters/__tests__/bugzy-reporter-failure-classification.test.ts +299 -0
- package/templates/playwright/reporters/bugzy-reporter.ts +172 -1
package/dist/index.cjs
CHANGED
|
@@ -5682,7 +5682,19 @@ After analyzing test results, triage each failure to determine if it's a product
|
|
|
5682
5682
|
|
|
5683
5683
|
**IMPORTANT: Do NOT report bugs without triaging first.**
|
|
5684
5684
|
|
|
5685
|
-
|
|
5685
|
+
### 1. Check Failure Classification
|
|
5686
|
+
|
|
5687
|
+
**Before triaging any failure**, read \`new_failures\` from the latest \`test-runs/*/manifest.json\`:
|
|
5688
|
+
|
|
5689
|
+
| \`new_failures\` State | Action |
|
|
5690
|
+
|------------------------|--------|
|
|
5691
|
+
| Non-empty array | Only triage failures listed in \`new_failures\`. Do not investigate, fix, or create issues for \`known_failures\`. |
|
|
5692
|
+
| Empty array | No new failures to triage. Output "0 new failures to triage" and skip the rest of this step. |
|
|
5693
|
+
| Field missing | Fall back: triage all failed tests (backward compatibility with older reporter versions). |
|
|
5694
|
+
|
|
5695
|
+
### 2. Triage Each Failure
|
|
5696
|
+
|
|
5697
|
+
For each failed test (from \`new_failures\` or all failures if field is missing):
|
|
5686
5698
|
|
|
5687
5699
|
1. **Read failure details** from JSON report (error message, stack trace)
|
|
5688
5700
|
2. **Classify the failure:**
|
|
@@ -5711,14 +5723,22 @@ For each failed test:
|
|
|
5711
5723
|
- Broken navigation flows
|
|
5712
5724
|
- Validation not working as expected
|
|
5713
5725
|
|
|
5714
|
-
|
|
5726
|
+
### 3. Document Results
|
|
5727
|
+
|
|
5715
5728
|
\`\`\`markdown
|
|
5716
|
-
### Failure Triage
|
|
5729
|
+
### Failure Triage Summary
|
|
5730
|
+
|
|
5731
|
+
**New failures triaged: N** | **Known failures skipped: M**
|
|
5717
5732
|
|
|
5718
5733
|
| Test ID | Test Name | Classification | Reason |
|
|
5719
5734
|
|---------|-----------|---------------|--------|
|
|
5720
5735
|
| TC-001 | Login test | TEST ISSUE | Selector brittle - uses CSS instead of role |
|
|
5721
5736
|
| TC-002 | Checkout | PRODUCT BUG | 500 error on form submit |
|
|
5737
|
+
|
|
5738
|
+
#### Skipped Known Failures
|
|
5739
|
+
| Test ID | Test Name | Last Passed Run |
|
|
5740
|
+
|---------|-----------|-----------------|
|
|
5741
|
+
| TC-003 | Search | 20260210-103045 |
|
|
5722
5742
|
\`\`\``,
|
|
5723
5743
|
tags: ["execution", "triage", "analysis"]
|
|
5724
5744
|
};
|
|
@@ -6276,10 +6296,36 @@ npx tsx reporters/parse-results.ts --input <file-or-url> [--timestamp <existing>
|
|
|
6276
6296
|
}
|
|
6277
6297
|
]
|
|
6278
6298
|
}
|
|
6299
|
+
],
|
|
6300
|
+
"new_failures": [
|
|
6301
|
+
{
|
|
6302
|
+
"id": "<test case id>",
|
|
6303
|
+
"name": "<test name>",
|
|
6304
|
+
"error": "<error message or null>",
|
|
6305
|
+
"lastPassedRun": "<timestamp of last passing run or null>"
|
|
6306
|
+
}
|
|
6307
|
+
],
|
|
6308
|
+
"known_failures": [
|
|
6309
|
+
{
|
|
6310
|
+
"id": "<test case id>",
|
|
6311
|
+
"name": "<test name>",
|
|
6312
|
+
"error": "<error message or null>",
|
|
6313
|
+
"lastPassedRun": null
|
|
6314
|
+
}
|
|
6279
6315
|
]
|
|
6280
6316
|
}
|
|
6281
6317
|
\`\`\`
|
|
6282
|
-
4.
|
|
6318
|
+
4. **Classify failures** \u2014 after building the manifest, classify each failed test as new or known:
|
|
6319
|
+
- Read \`BUGZY_FAILURE_LOOKBACK\` env var (default: 5)
|
|
6320
|
+
- List previous \`test-runs/*/manifest.json\` files sorted by timestamp descending (skip current run)
|
|
6321
|
+
- For each failed test in the manifest:
|
|
6322
|
+
- If it passed in any of the last N runs \u2192 \`new_failures\` (include the timestamp of the last passing run in \`lastPassedRun\`)
|
|
6323
|
+
- If it failed in ALL of the last N runs \u2192 \`known_failures\`
|
|
6324
|
+
- If the test doesn't exist in any previous run \u2192 \`new_failures\` (new test)
|
|
6325
|
+
- If no previous runs exist at all (first run) \u2192 all failures go to \`new_failures\`
|
|
6326
|
+
- Write the \`new_failures\` and \`known_failures\` arrays into the manifest
|
|
6327
|
+
|
|
6328
|
+
5. For each failed test, create:
|
|
6283
6329
|
- Directory: \`test-runs/{timestamp}/{testCaseId}/exec-1/\`
|
|
6284
6330
|
- File: \`test-runs/{timestamp}/{testCaseId}/exec-1/result.json\` containing:
|
|
6285
6331
|
\`\`\`json
|
|
@@ -6291,8 +6337,8 @@ npx tsx reporters/parse-results.ts --input <file-or-url> [--timestamp <existing>
|
|
|
6291
6337
|
"testFile": "<file path if available>"
|
|
6292
6338
|
}
|
|
6293
6339
|
\`\`\`
|
|
6294
|
-
|
|
6295
|
-
|
|
6340
|
+
6. Print the manifest path to stdout
|
|
6341
|
+
7. Exit code 0 on success, non-zero on failure
|
|
6296
6342
|
|
|
6297
6343
|
**Incremental mode** (\`--timestamp\` + \`--test-id\` provided):
|
|
6298
6344
|
1. Read existing \`test-runs/{timestamp}/manifest.json\`
|