@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/cli/index.cjs
CHANGED
|
@@ -6061,7 +6061,19 @@ After analyzing test results, triage each failure to determine if it's a product
|
|
|
6061
6061
|
|
|
6062
6062
|
**IMPORTANT: Do NOT report bugs without triaging first.**
|
|
6063
6063
|
|
|
6064
|
-
|
|
6064
|
+
### 1. Check Failure Classification
|
|
6065
|
+
|
|
6066
|
+
**Before triaging any failure**, read \`new_failures\` from the latest \`test-runs/*/manifest.json\`:
|
|
6067
|
+
|
|
6068
|
+
| \`new_failures\` State | Action |
|
|
6069
|
+
|------------------------|--------|
|
|
6070
|
+
| Non-empty array | Only triage failures listed in \`new_failures\`. Do not investigate, fix, or create issues for \`known_failures\`. |
|
|
6071
|
+
| Empty array | No new failures to triage. Output "0 new failures to triage" and skip the rest of this step. |
|
|
6072
|
+
| Field missing | Fall back: triage all failed tests (backward compatibility with older reporter versions). |
|
|
6073
|
+
|
|
6074
|
+
### 2. Triage Each Failure
|
|
6075
|
+
|
|
6076
|
+
For each failed test (from \`new_failures\` or all failures if field is missing):
|
|
6065
6077
|
|
|
6066
6078
|
1. **Read failure details** from JSON report (error message, stack trace)
|
|
6067
6079
|
2. **Classify the failure:**
|
|
@@ -6090,14 +6102,22 @@ For each failed test:
|
|
|
6090
6102
|
- Broken navigation flows
|
|
6091
6103
|
- Validation not working as expected
|
|
6092
6104
|
|
|
6093
|
-
|
|
6105
|
+
### 3. Document Results
|
|
6106
|
+
|
|
6094
6107
|
\`\`\`markdown
|
|
6095
|
-
### Failure Triage
|
|
6108
|
+
### Failure Triage Summary
|
|
6109
|
+
|
|
6110
|
+
**New failures triaged: N** | **Known failures skipped: M**
|
|
6096
6111
|
|
|
6097
6112
|
| Test ID | Test Name | Classification | Reason |
|
|
6098
6113
|
|---------|-----------|---------------|--------|
|
|
6099
6114
|
| TC-001 | Login test | TEST ISSUE | Selector brittle - uses CSS instead of role |
|
|
6100
6115
|
| TC-002 | Checkout | PRODUCT BUG | 500 error on form submit |
|
|
6116
|
+
|
|
6117
|
+
#### Skipped Known Failures
|
|
6118
|
+
| Test ID | Test Name | Last Passed Run |
|
|
6119
|
+
|---------|-----------|-----------------|
|
|
6120
|
+
| TC-003 | Search | 20260210-103045 |
|
|
6101
6121
|
\`\`\``,
|
|
6102
6122
|
tags: ["execution", "triage", "analysis"]
|
|
6103
6123
|
};
|
|
@@ -6666,10 +6686,36 @@ npx tsx reporters/parse-results.ts --input <file-or-url> [--timestamp <existing>
|
|
|
6666
6686
|
}
|
|
6667
6687
|
]
|
|
6668
6688
|
}
|
|
6689
|
+
],
|
|
6690
|
+
"new_failures": [
|
|
6691
|
+
{
|
|
6692
|
+
"id": "<test case id>",
|
|
6693
|
+
"name": "<test name>",
|
|
6694
|
+
"error": "<error message or null>",
|
|
6695
|
+
"lastPassedRun": "<timestamp of last passing run or null>"
|
|
6696
|
+
}
|
|
6697
|
+
],
|
|
6698
|
+
"known_failures": [
|
|
6699
|
+
{
|
|
6700
|
+
"id": "<test case id>",
|
|
6701
|
+
"name": "<test name>",
|
|
6702
|
+
"error": "<error message or null>",
|
|
6703
|
+
"lastPassedRun": null
|
|
6704
|
+
}
|
|
6669
6705
|
]
|
|
6670
6706
|
}
|
|
6671
6707
|
\`\`\`
|
|
6672
|
-
4.
|
|
6708
|
+
4. **Classify failures** \u2014 after building the manifest, classify each failed test as new or known:
|
|
6709
|
+
- Read \`BUGZY_FAILURE_LOOKBACK\` env var (default: 5)
|
|
6710
|
+
- List previous \`test-runs/*/manifest.json\` files sorted by timestamp descending (skip current run)
|
|
6711
|
+
- For each failed test in the manifest:
|
|
6712
|
+
- If it passed in any of the last N runs \u2192 \`new_failures\` (include the timestamp of the last passing run in \`lastPassedRun\`)
|
|
6713
|
+
- If it failed in ALL of the last N runs \u2192 \`known_failures\`
|
|
6714
|
+
- If the test doesn't exist in any previous run \u2192 \`new_failures\` (new test)
|
|
6715
|
+
- If no previous runs exist at all (first run) \u2192 all failures go to \`new_failures\`
|
|
6716
|
+
- Write the \`new_failures\` and \`known_failures\` arrays into the manifest
|
|
6717
|
+
|
|
6718
|
+
5. For each failed test, create:
|
|
6673
6719
|
- Directory: \`test-runs/{timestamp}/{testCaseId}/exec-1/\`
|
|
6674
6720
|
- File: \`test-runs/{timestamp}/{testCaseId}/exec-1/result.json\` containing:
|
|
6675
6721
|
\`\`\`json
|
|
@@ -6681,8 +6727,8 @@ npx tsx reporters/parse-results.ts --input <file-or-url> [--timestamp <existing>
|
|
|
6681
6727
|
"testFile": "<file path if available>"
|
|
6682
6728
|
}
|
|
6683
6729
|
\`\`\`
|
|
6684
|
-
|
|
6685
|
-
|
|
6730
|
+
6. Print the manifest path to stdout
|
|
6731
|
+
7. Exit code 0 on success, non-zero on failure
|
|
6686
6732
|
|
|
6687
6733
|
**Incremental mode** (\`--timestamp\` + \`--test-id\` provided):
|
|
6688
6734
|
1. Read existing \`test-runs/{timestamp}/manifest.json\`
|