Command Palette

Search for a command to run...

UnylyUnyly
Назад к скиллам

flake-dashboard-author

БесплатноБез исполняемых скриптовНе проверен

Use for any question or task about tracking flaky-test rates or test reliability over time, including a weekly or monthly test-health report for management: a…

testlandот testland★ 18 звёзд на GitHub

Об этом скилле

flake-dashboard-author

Terminology note: "flaky test" is a practitioner-emergent term used in the industry engineering tradition (Google Testing Blog, google-flaky). "Defect," "failure," and "test run" follow ISTQB Glossary v4.7.1 definitions. "Test suite" and "test case" are used per ISTQB as well.

A weekly markdown snapshot report gives a comparable point-in-time view. This skill builds the persistent infrastructure layer: a live dashboard that accumulates run history and surfaces the flake-rate metric continuously, rather than on demand.

Step 1 - Define the flake-rate metric

The canonical flake-rate formula for a single test T over a window of N runs is:

flake_rate(T, window) = (failed_runs(T, window) + retried_passed_runs(T, window))
                        -------------------------------------------------------
                                      total_runs(T, window)

A run counts as "retried-passed" when the test framework reports it as flaky (passed only after at least one retry). Playwright marks these in reporter.onTestEnd with result.status === 'flaky' (Playwright reporter API). JUnit XML uses a <rerunFailure> element inside <testcase> (Surefire / junit-xml convention) or a <flakyFailure> element in the Jenkins JUnit plugin extension.

Choose your window at ingestion time. Recommended defaults:

Team cadence Window Minimum runs before showing rate
Multiple deploys per day 7 days 20
One deploy per day 14 days 10
Weekly releases 30 days 5

Step 2 - Build the data model

Persist one row per test-case execution. Minimum schema:

CREATE TABLE test_runs (
  run_id        TEXT        NOT NULL,
  suite_name    TEXT        NOT NULL,
  test_name     TEXT        NOT NULL,
  status        TEXT        NOT NULL,  -- 'passed' | 'failed' | 'flaky' | 'skipped'
  duration_ms   INTEGER     NOT NULL,
  branch        TEXT,
  commit_sha    TEXT,
  worker_index  INTEGER,
  started_at    TIMESTAMPTZ NOT NULL,
  PRIMARY KEY (run_id, suite_name, test_name)
);

CREATE INDEX idx_test_runs_name_time ON test_runs (test_name, started_at);

status = 'flaky' is the retried-passed value emitted by Playwright retries (Playwright retries) and by the Jenkins JUnit plugin's <flakyFailure> extension. For raw JUnit XML without retry markup, derive flaky by joining two rows with the same run_id + test_name where one is failed and the next is passed within the same CI run.

Populate from JUnit XML using xmllint --xpath:

# Extract per-testcase rows from a JUnit XML report
xmllint --xpath '//testcase' report.xml \
  | python3 scripts/parse_junit.py --output jsonl >> test_runs.jsonl

Populate from Playwright JSON reporter output (--reporter=json) by iterating results[].suites[].specs[].tests[].results[].

Step 3 - Author the Grafana panel JSON

The following panel JSON renders a time-series of per-test flake rate over a 14-day rolling window. Paste it into Dashboard JSON model (toolbar Export > Copy JSON) or POST it to the Grafana Dashboard HTTP API ([Grafana Dashboard API][grafana-dash-api]).

{
  "type": "timeseries",
  "title": "Flake rate per test (14-day rolling)",
  "datasource": { "type": "postgres", "uid": "${DS_POSTGRES}" },
  "gridPos": { "h": 8, "w": 24, "x": 0, "y": 0 },
  "id": 1,
  "targets": [
    {
      "refId": "A",
      "datasource": { "type": "postgres", "uid": "${DS_POSTGRES}" },
      "rawSql": "SELECT date_trunc('day', started_at) AS time, test_name, ROUND(100.0 * SUM(CASE WHEN status IN ('failed','flaky') THEN 1 ELSE 0 END) / COUNT(*), 2) AS flake_rate FROM test_runs WHERE started_at >= NOW() - INTERVAL '14 days' GROUP BY 1, 2 ORDER BY 1",
      "format": "time_series"
    }
  ],
  "fieldConfig": {
    "defaults": {
      "color": { "mode": "palette-classic" },
      "unit": "percent",
      "thresholds": {
        "mode": "absolute",
        "steps": [
          { "color": "green", "value": null },
          { "color": "yellow", "value": 2 },
          { "color": "red", "value": 5 }
        ]
      },
      "custom": {
        "lineWidth": 2,
        "fillOpacity": 10,
        "pointSize": 5,
        "showPoints": "auto",
        "spanNulls": false
      }
    },
    "overrides": []
  },
  "options": {
    "legend": { "displayMode": "table", "placement": "bottom", "calcs": ["lastNotNull", "max"] },
    "tooltip": { "mode": "multi", "sort": "desc" }
  }
}

Key fields per the [Grafana time-series panel docs][grafana-ts]:

  • fieldConfig.defaults.thresholds.steps - color bands at 2% (yellow) and 5% (red) correspond to the quarantine-candidate thresholds in Step 5.
  • `fieldConfig.defaults.un
Полный SKILL.md на GitHub

Установить flake-dashboard-author в Claude Code и Claude Desktop

Зарегайся, чтобы установить скилл

Создай бесплатный аккаунт, чтобы открыть команду установки и сохранить скилл в библиотеку.

  • Открой команду установки в одну строку
  • Сохраняй скиллы в синхронизируемую библиотеку
  • Уведомления, когда скиллы обновляются
Зарегаться бесплатноУ меня уже есть аккаунт

Разрешённые инструменты

Инструменты, которые скиллу разрешено вызывать.

Без ограничений — скилл может использовать любой инструмент.

Вложенные файлы

.tessl-plugin/plugin.json

FAQ

Что делает скилл flake-dashboard-author?

Use for any question or task about tracking flaky-test rates or test reliability over time, including a weekly or monthly test-health report for management: a flake-rate metric from CI history (JUnit XML or JSON), a Grafana panel or Datadog CI Visibility view, the quarantine-candidate query, trend alerts and the report for Slack or a wiki.

Как установить скилл flake-dashboard-author?

Скопируй папку скилла в ~/.claude/skills (вкладка Claude Code выше делает это одной командой), либо поставь как плагин.

Скилл flake-dashboard-author запускает скрипты?

Нет, скилл состоит только из инструкций (SKILL.md), без исполняемых скриптов.

Похожие скиллы

Сравнить flake-dashboard-author с