跳到正文
cccskills
免费在 GitHub 公开

e2e-suite-budget

Caps E2E suite size by computing per-test ROI - (regressions caught × value) ÷ (runtime × flake rate × maintenance) - then ranks every end-to-end test and recommends which bottom-decile ones to retire, move to a lower layer, or fix. Use when CI is slow or E2E-dominated, flaky failures are rising, or quarterly to keep suite size within maintenance capacity. For strategic unit:service:UI layer ratios use test-pyramid-balancer, for the minimal per-deploy critical-path gate use smoke-suite-gate, and for quarantining flaky tests use flaky-test-quarantine; this prunes low-signal tests by ROI.

中文简介正在准备中。当前显示原文说明。

testland/qa星标 13(GitHub 13 + cccskills 0)

实测评分 未实测

查看安装方法

包含的文件(13)

  • SKILL.md9.4 KB
  • .tessl-plugin/plugin.json731 B
  • evals/cutting-a-30-minute-e2e-job-to-20/criteria.json8.2 KB
  • evals/cutting-a-30-minute-e2e-job-to-20/task.md15.5 KB
  • evals/deletion-pr-waiting-on-the-friday-release-train/criteria.json7.7 KB
  • evals/deletion-pr-waiting-on-the-friday-release-train/task.md12.1 KB
  • evals/three-new-tests-for-a-suite-already-over-target/criteria.json7.2 KB
  • evals/three-new-tests-for-a-suite-already-over-target/task.md9.4 KB
  • evals/two-teams-ask-to-change-the-scoring-inputs/criteria.json7.1 KB
  • evals/two-teams-ask-to-change-the-scoring-inputs/task.md16.6 KB
  • evals/weekly-scoring-job-on-a-patchy-ci-export/criteria.json8.1 KB
  • evals/weekly-scoring-job-on-a-patchy-ci-export/task.md9.9 KB
  • references/anti-patterns-and-limitations.md2.0 KB

SKILL.md(原文)

安装前可以查看交给 AI 代理的指令内容。

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

  1. Gather the E2E inventory - per test, pull runtime, flake rate, regressions caught, maintenance PR count, and a 1-5 value tier (Step 1).
  2. Validate inputs - confirm every test has runtime and flake data; flag and exclude gaps (Step 1a).
  3. Compute per-test ROI = (regressions caught × value) / (runtime × flake rate × maintenance) (Steps 2-3).
  4. Rank every test ascending by ROI and take the bottom decile as the action list (Step 4).
  5. Decide per bottom-decile test: retire, move to a lower layer, or fix the flake (Step 5).
  6. Enforce the absolute budget - once the suite exceeds the cap, adding a new E2E test must retire an existing one (Step 6).
  7. 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-analysis in 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 stats must have a runtime_min value; flag any missing as SKIP - no runtime data.
  • Flag any test with a missing or null flake_rate as NEEDS MANUAL REVIEW and exclude from automated scoring until resolved.
  • Confirm maintenance and regressions files share the same set of test IDs as stats; log any mismatches.
  • Sanity-check the ROI distribution after scoring (Step 3): if >50% of tests score 0.0, the regressions data 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_min is the test's average runtime in minutes.
  • flake_rate ∈ [0, 1] (e.g., 0.05 = 5% flake).
  • maintenance_count_norm is 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)                                       |     |         |       |                    |            |                |

### Estimated impact of acting on all 14

- Suite size: 142 → 128 (-14)
- Runtime: 38 min → 28 min (-10 min per CI run, ~26% reduction)
- Flake-related reruns: estimated -50%
- Maintenance load: -20% (these 14 had the highest PR-touch count)

Step 5 - Categorize recommendations

ClassAction
retireDelete; covered by other tests OR feature deprecated.
lower-layerRewrite at unit / integration; cheaper.
fix-flakeTests catches bugs but flakes; investigate per flaky-test-quarantine (in the qa-flake-triage plugin).
consolidateMerge with sibling test that overlaps.
keep-but-monitorLow ROI but catches important regressions; tag for next-quarter review.

The team picks the appropriate class per test; the skill recommends.

Step 6 - Cap discipline

Set an absolute budget:

# e2e-budget.yml
budget:
  max_tests: 100
  max_runtime_min: 30
  max_flake_rate: 0.03   # 3%

When the suite exceeds budget, the next sprint's "add new E2E test" requires retiring / moving an existing one. Force the trade-off.

Step 7 - Cadence

CadenceTrigger
QuarterlyScheduled review.
Per-major-featureNew tests added; verify suite stays under budget.
After flake spikeReactive review; flake source likely a low-ROI test.

Worked example

A 40-test E2E suite, median maintenance = 2 PRs/quarter (so maintenance_count_norm = PRs ÷ 2). Scoring three representative tests:

TestRegressionsValueRuntimeFlakePRs (norm)ROI
checkout.spec.ts > guest-purchase452.0m2%2 (1.0)4.9
admin-report.spec.ts > csv-export123.5m10%3 (1.5)0.21
legacy-banner.spec.ts > dismiss-cookie011.8m20%4 (2.0)0.0

The ROI column above is computed with the Step 2 formula. Ranked ascending: dismiss-cookie (0.0) → csv-export (0.21) → guest-purchase (4.9). The bottom decile of 40 is the lowest 4 tests; the first two here fall in it.

Decisions:

  • dismiss-cookie → retire: 0 regressions in the window, 20% flake, feature deprecated - pure cost.
  • csv-export → lower-layer: catches a real regression but tier-2 value, and CSV formatting is cheaply covered by a unit test; rewrite there.
  • guest-purchase → keep: highest ROI in the suite; critical journey, low flake, worth its runtime.

Anti-patterns and Limitations

See references/anti-patterns-and-limitations.md for common failure modes (missing regression data, auto-retiring without review, cherry-picking) and known constraints (difficulty gathering regression-catch data, heuristic formula tuning, "test of last resort" cases, migration cost).

References

  • tp - Cohn's pyramid: UI tests "brittle, expensive to write, and time consuming to run."
  • test-pyramid-balancer - sibling: identifies the layer-balance issue this skill addresses tactically.
  • flaky-test-quarantine - sibling: handles the flake side of low-ROI tests.
  • junit-xml-analysis - upstream: provides per-test runtime + flake stats.
  • test-coverage-targeter - complementary: identifies what to add at the unit layer when E2E tests get retired.

评价

还没有评价。欢迎分享你的使用感受。

评论

无需登录即可发表。欢迎分享使用感受、提问,或说明在哪些环境下无法运行。

还没有评论。来写第一条吧。

提交后会立即公开。请勿填写邮箱、电话等个人信息。URL 最多 2 个。

0 / 1000 字

此表单受 reCAPTCHA 保护,适用 Google 的隐私权政策和服务条款。

同一仓库的技能

Builds a CI gate that fails the build on **new** WCAG / a11y violations introduced by a PR while grandfathering pre-existing violations on a per-rule / per-page baseline. Aggregates verdicts from axe-core / pa11y / Lighthouse a11y / WAVE / IBM Equal Access scans. Use when a project has accumulated a11y debt and a strict "zero violations" gate would block every PR - the ratchet pattern lets the team ship while preventing regressions.

中文简介正在准备中。当前显示原文说明。

testland/qa132026年10月20日 更新

Workflow skill that builds an A/B-test validity checklist from an experiment proposal, walking the canonical design-correctness gates - pre-registered OEC/power/guardrails, randomization unit + SRM check, assignment integrity, telemetry, peeking discipline, novelty/primacy, post-experiment SRM re-check - into a per-experiment checklist + sign-off form. Use when launching, auditing, or governing an experiment. For pitfall mechanics (guardrails, peeking) see experiment-results-interpreter's references; to read an already-valid result use experiment-results-interpreter; for per-SDK harness tests use experiment-sdk-testing - this gates DESIGN, not SDK code.

中文简介正在准备中。当前显示原文说明。

testland/qa132026年10月20日 更新

The single install-flow skill: the reference contract for the PWA install flow (installability gate fields, `beforeinstallprompt` handshake, per-platform paths - Android WebAPK / iOS Share menu / Firefox no-op - and the `display-mode` post-install signal, in references/install-flow-reference.md) plus the build-an-X workflow that emits the Add-to-Home-Screen suite. Walks the four-stage timeline, emitting one test per gate cell per [web.dev/articles/install-criteria][install-criteria], the deferred-prompt → `prompt()` → `userChoice` chain per [web.dev/articles/customize-install][customize-install], the iOS Safari manual-metadata branch (`apple-touch-icon`) per [web.dev/learn/pwa/installation][learn-pwa], and the post-install `(display-mode: standalone)` MQ assertion. Output: a Playwright spec with per-stage cells plus a coverage matrix. Use when a PWA's manifest, icons, or install handler change, when install conversion drops at an unknown stage, or when triaging a flaky install assertion.

中文简介正在准备中。当前显示原文说明。

testland/qa132026年10月20日 更新

Build-an-X workflow that uses an LLM to map existing tests to spec sections - given a spec doc + the test suite, the LLM identifies which tests cover which sections, surfaces uncovered sections (gap), and recommends specific tests to add. Output is a coverage matrix per spec ID. Scope is mapping tests that already exist and naming the gaps, not authoring tests for new acceptance criteria. Use when a spec doc and a test suite both exist but nobody can say which requirements are actually covered - before a release sign-off, an audit, or a decision about where to spend the next round of test effort.

中文简介正在准备中。当前显示原文说明。

testland/qa132026年10月20日 更新

Generates tests from natural-language specs (acceptance criteria, user stories, requirements) using an LLM, with confidence scoring per test case (LLM self-assessment plus heuristics: assertion quality, naming, completeness), batching uncertain cases for human review, and integration with the team's existing test framework. Use when the user asks to generate unit tests from acceptance criteria, convert user stories to test cases, automate test creation from requirements, or augment a spec-driven test suite with AI-generated stubs that are then curated before merge.

中文简介正在准备中。当前显示原文说明。

testland/qa132026年10月20日 更新

Configures Allure Report (test-runner adapter install, `allure-results` directory wiring, `categories.json` for failure classification, `history-trend.json` retention via the copy-history-between-runs pattern), runs the Allure CLI to convert `allure-results` to a static HTML site, and uploads the report as a CI artifact. Use when the team needs richer test reporting than JUnit XML - step-level attachments, per-test history, retry tracking, and severity / epic / feature labeling across framework-agnostic adapters (pytest, Jest, JUnit, TestNG, NUnit, Mocha). As a rich static HTML report generator, it is the open-source alternative to the sunset ExtentReports (JVM/.NET per-test HTML narrative); for hosted cross-run flakiness analytics rather than a static per-run report use currents-integration.

中文简介正在准备中。当前显示原文说明。

testland/qa132026年10月20日 更新

查看 testland 的全部技能

报告此技能的问题