Skip to content

Dashboard Enhancement: Trend Charts and Analytics #79

Description

@ojfbot

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

  • Trend chart displays failure rate over time
  • Component health grid shows pass rates
  • Flaky tests are automatically detected and flagged
  • Historical comparison works for any two runs
  • Analytics data updates with dashboard refresh
  • Charts are responsive (mobile-friendly)
  • Performance: < 100ms to render charts

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)

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions