Overview
Add trend charts and analytics to the visual regression dashboard to track test health over time and identify patterns in failures.
Goal: Make sense of the noise by visualizing trends and identifying patterns in test results.
Features
1. Failure Trend Chart (Priority: High)
Display: Line chart showing failure rate over time
- X-axis: Time (last 30 days, configurable)
- Y-axis: Failure percentage
- Data points: Test runs with hover details
Metrics:
- Overall pass/fail rate
- Failure rate by component/diagram
- Average diff percentage over time
- Test duration trends
Implementation:
- Use Chart.js (already in dependencies)
- Data source: Aggregate from index.json and manifests
- Update on dashboard data refresh
2. Component Health Dashboard
Display: Grid of components with health status
- Component name
- Pass rate (last 30 days)
- Latest status (✓/✗)
- Trend indicator (↑/→/↓)
Filters:
- Show only failing components
- Sort by failure rate
- Group by diagram
3. Flaky Test Detection
Identify tests that flip between pass/fail:
- Calculate flip rate (% of runs with status change)
- Flag tests with >20% flip rate as "flaky"
- Show flaky badge on test cards
- Dedicated "Flaky Tests" filter
4. Historical Comparison
Compare two test runs side-by-side:
- Select two runs from timeline
- Show diff statistics
- Highlight changed components
- Visual diff of screenshots
Acceptance Criteria
Technical Notes
- Chart.js already included in dependencies
- Use memoization for expensive calculations
- Cache analytics data in index.json
- Update analytics during CI/CD run
Part of #71 (Visual Regression Testing Pipeline)
Follows #76 (GitHub Pages Dashboard)
Overview
Add trend charts and analytics to the visual regression dashboard to track test health over time and identify patterns in failures.
Goal: Make sense of the noise by visualizing trends and identifying patterns in test results.
Features
1. Failure Trend Chart (Priority: High)
Display: Line chart showing failure rate over time
Metrics:
Implementation:
2. Component Health Dashboard
Display: Grid of components with health status
Filters:
3. Flaky Test Detection
Identify tests that flip between pass/fail:
4. Historical Comparison
Compare two test runs side-by-side:
Acceptance Criteria
Technical Notes
Part of #71 (Visual Regression Testing Pipeline)
Follows #76 (GitHub Pages Dashboard)