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