e2e-suite-budget
БесплатноБез исполняемых скриптовНе проверенUse when CI is slow or dominated by end-to-end tests, flaky failures are rising, or for a quarterly suite review. Ranks every E2E test by ROI (regressions…
от testland★ 18 звёзд на GitHubОб этом скилле
e2e-suite-budget
Overview
This skill computes per-test ROI and recommends which tests to retire / move to a lower layer / fix.
When to use
- E2E suite has grown past 50-100 tests.
- CI time is dominated by E2E (slow CI pipeline).
- Flake rate >5%; team is fatigued.
- Team wants to reduce test maintenance burden or decide which tests to remove.
- Quarterly: scheduled budget review.
How to use
- Gather the E2E inventory - per test, pull runtime, flake rate, regressions caught, maintenance PR count, and a 1-5 value tier (Step 1).
- Validate inputs - confirm every test has runtime and flake data; flag and exclude gaps (Step 1a).
- Compute per-test ROI = (regressions caught × value) / (runtime × flake rate × maintenance) (Steps 2-3).
- Rank every test ascending by ROI and take the bottom decile as the action list (Step 4).
- Decide per bottom-decile test: retire, move to a lower layer, or fix the flake (Step 5).
- Enforce the absolute budget - once the suite exceeds the cap, adding a new E2E test must retire an existing one (Step 6).
- Re-run quarterly, and reactively after any flake spike (Step 7).
Step 1 - Inputs
Per-E2E-test, the agent / skill needs:
- Runtime: average per-test duration (from CI).
- Flake rate: % of CI runs where the test failed then passed
on retry (from CI history per
junit-xml-analysisin the qa-test-reporting plugin, Step 3). - Regression-catch count: how many real bugs this test caught in the last N months (from incident postmortems referencing the test, or git-blame on the failing-then-fixed pattern).
- Maintenance cost: PR count modifying the test in last N months (proxy for fragility).
- Value tier: 1-5; assigned by team (5 = critical journey).
Step 1a - Validate inputs
Before scoring, verify data completeness:
- Every test ID present in
statsmust have aruntime_minvalue; flag any missing as SKIP - no runtime data. - Flag any test with a missing or null
flake_rateas NEEDS MANUAL REVIEW and exclude from automated scoring until resolved. - Confirm
maintenanceandregressionsfiles share the same set of test IDs asstats; log any mismatches. - Sanity-check the ROI distribution after scoring (Step 3): if >50% of tests score 0.0, the
regressionsdata is likely missing or incomplete - warn before generating recommendations.
Step 2 - ROI formula
ROI = (regressions_caught × value_tier) / (runtime_min × (1 + flake_rate) × (1 + maintenance_count_norm))
Where:
regressions_caught≥ 0 (defaults to 0; can be fractional for "caught a near-miss").value_tier∈ [1, 5].runtime_minis the test's average runtime in minutes.flake_rate∈ [0, 1] (e.g., 0.05 = 5% flake).maintenance_count_normis PRs touching the test in the window divided by the median for the suite (so a typical-maintenance test has factor ~1).
Higher ROI = more value per cost.
Step 3 - Per-test scoring
# per-test ROI scoring - implements the Step 2 formula
import json, sys
from collections import defaultdict
# Load per-test stats from CI history
stats = json.load(open(sys.argv[1])) # {test_id: {runtime, flake_rate, ...}}
regressions = json.load(open(sys.argv[2])) # {test_id: count}
value_tiers = json.load(open(sys.argv[3])) # {test_id: tier}
maintenance = json.load(open(sys.argv[4])) # {test_id: pr_count}
median_pr_count = sorted(maintenance.values())[len(maintenance) // 2] or 1
scores = {}
for tid, s in stats.items():
rc = regressions.get(tid, 0)
vt = value_tiers.get(tid, 3)
rt = s['runtime_min']
fr = s['flake_rate']
mn = maintenance.get(tid, 0) / median_pr_count
score = (rc * vt) / (rt * (1 + fr) * (1 + mn))
scores[tid] = score
# Sort ascending - lowest ROI first
ranked = sorted(scores.items(), key=lambda x: x[1])
print(json.dumps(ranked))
Step 4 - Output: bottom decile
## E2E suite budget - `<repo>` - Q2 2026
**Total E2E tests:** 142
**Total runtime:** 38 min (per CI run)
**Median flake rate:** 4.2%
**Bottom-decile (14 tests) recommended for action:**
| Test | ROI | Runtime | Flake | Regressions caught | Value tier | Recommendation |
|---------------------------------------------------|----:|--------:|------:|-------------------:|-----------:|----------------|
| `archive-flow.spec.ts > old-orders` | 0.0 | 2.1m | 18% | 0 | 2 | Retire - high flake, no signal in 6mo. |
| `legacy-checkout.spec.ts > deprecated-promo` | 0.1 | 3.2m | 8% | 0 | 1 | Retire - feature deprecated. |
| `cart.spec.ts > add 1000 items` | 0.2 | 4.5m | 2% | 0 | 2 | Move to perf suite - not E2E concern. |
| `e2e-utils.spec.ts > date-formatting` | 0.5 | 0.8m | 1% | 0 | 2 | Move to unit layer. |
| ... (10 more)
Установить e2e-suite-budget в Claude Code и Claude Desktop
Зарегайся, чтобы установить скилл
Создай бесплатный аккаунт, чтобы открыть команду установки и сохранить скилл в библиотеку.
- Открой команду установки в одну строку
- Сохраняй скиллы в синхронизируемую библиотеку
- Уведомления, когда скиллы обновляются
Разрешённые инструменты
Инструменты, которые скиллу разрешено вызывать.
Без ограничений — скилл может использовать любой инструмент.
Вложенные файлы
FAQ
Что делает скилл e2e-suite-budget?
Use when CI is slow or dominated by end-to-end tests, flaky failures are rising, or for a quarterly suite review. Ranks every E2E test by ROI (regressions caught vs runtime, flake rate and maintenance) and recommends which to retire, move to a lower layer or fix.
Как установить скилл e2e-suite-budget?
Скопируй папку скилла в ~/.claude/skills (вкладка Claude Code выше делает это одной командой), либо поставь как плагин.
Скилл e2e-suite-budget запускает скрипты?
Нет, скилл состоит только из инструкций (SKILL.md), без исполняемых скриптов.
Похожие скиллы
mcp-builder
Guide for creating high-quality MCP (Model Context Protocol) servers that enable LLMs to interact with external services through well-designed tools. Use when…
от Anthropicclaude-api
Reference for the Claude API / Anthropic SDK — model ids, pricing, params, streaming, tool use, MCP, agents, caching, token counting, model migration. TRIGGER…
от Anthropicalgorithmic-art
Creating algorithmic art using p5.js with seeded randomness and interactive parameter exploration. Use this when users request creating art using code…
от Anthropicmcp-integration
This skill should be used when the user asks to "add MCP server", "integrate MCP", "configure MCP in plugin", "use .mcp.json", "set up Model Context…
от Anthropic