Deep-Dive Failure Analysis
When test runs fail, identifying root causes quickly is critical. Zen Reporterβs Failures tab provides an advanced error diagnostic engine featuring error signature clustering, step-by-step trace step execution, source code syntax highlighting, and retry attempt inspection.
π Failure Grouping Modes
Section titled βπ Failure Grouping ModesβAt the top of the Failures tab, users can toggle between two intelligent failure grouping modes:
[ Group by File ] vs. [ Cluster by Error Signature (Shared Issues) ]1. Group by File
Section titled β1. Group by FileβOrganizes test failures by their parent spec file path. Ideal when debugging a broken spec file locally.
2. Cluster by Error Signature (Shared Issue Clusters)
Section titled β2. Cluster by Error Signature (Shared Issue Clusters)βAnalyzes stack trace messages and error locations across all failed tests to cluster failures sharing identical root causes.
- Problem Solved: If an authentication API goes down, 50 different test cases across 10 spec files might fail with
Error: 500 Internal Server Error at /api/login. - Zen Reporter Solution: Groups all 50 failures into a single Shared Issue Cluster. QA engineers analyze and document 1 root cause instead of triage 50 individual items.
π οΈ Granular Failure Inspection Tools
Section titled βπ οΈ Granular Failure Inspection ToolsβClicking on any failed test case opens the comprehensive diagnostic details:
βββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ π΄ test("User checkout completes") - Attempt #2 (Failed) βββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ€β [ Run 1 (Failed) ] [ Run 2 - Retry #1 (Failed) ] βββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ€β Step-by-Step Execution Trace ββ β
1. Navigate to /cart (230ms) ββ β
2. Fill credit card details (450ms) ββ βΆ π΄ 3. Click #checkout-btn (5000ms - FAILED) βββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ€β Error Stack Trace & Syntax Highlighted Code Frame ββ > 42 | await page.locator('#checkout-btn').click(); ββ 43 | await expect(page.locator('.success')).toBeVisible(); ββ ^ Error: Timed out 5000ms waiting for expect(locator)... βββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ€β Diff Stack Trace Comparison ββ Expected: "Order Confirmed" ββ Received: "Payment Processing Error" βββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ€β Attachments & Logs ββ [ π· trace-screenshot.png ] [ π₯ video.webm ] [ π trace.zip ] βββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
π Key Diagnostic Capabilities
Section titled βπ Key Diagnostic Capabilitiesβ1. Target Step Indicator (βΆ)
Section titled β1. Target Step Indicator (βΆ)βIn the step-by-step execution trace, Zen Reporter pinpoints the exact line where Playwright execution aborted with a prominent target arrow indicator (βΆ). No more scrolling through numerous passed steps to find the assertion failure.

2. Syntax-Highlighted Code Frame Snippets
Section titled β2. Syntax-Highlighted Code Frame SnippetsβExtracts source code lines directly from Playwright test files and renders inline syntax highlighting with context lines surrounding the failed assertion line.

3. Structured Diff Stack Trace (Expected vs. Received)
Section titled β3. Structured Diff Stack Trace (Expected vs. Received)βFor Playwright expect() value assertion mismatches, Zen Reporter formats visual color-coded text diffs highlighting exact string or JSON object discrepancies:
- π’ Expected: Expected object structure or baseline text.
- π΄ Received: Actual runtime output returned by the application under test.

4. Retry Attempt Inspection Tabs (Run, Retry #1, Retry #2)
Section titled β4. Retry Attempt Inspection Tabs (Run, Retry #1, Retry #2)βWhen Playwright retries flaky tests (retries: 2 in playwright.config.ts), Zen Reporter creates dedicated tab panels for each execution attempt. Users can inspect trace steps, console logs, and screenshots for both the initial failing attempt and subsequent retries, in a single place.

5. Attachments & Artifact Integration
Section titled β5. Attachments & Artifact IntegrationβDirect access to Playwright test artifacts:
- Text Artifacts: Inline previews for text file artifacts.
- Screenshots: Inline image previews for failure snapshots.
- Videos: Built-in video player for test execution recordings (
video: 'retain-on-failure'). - Trace Viewer Downloads: One-click direct link to Playwright trace files (
trace: 'retain-on-failure').


