ReferenceResults

Metrics

Every metric Endform calculates from your suite runs, test runs, and test attempts, including exact formulas, exclusions, and ranking thresholds.

Endform calculates pass rates, durations, flakiness, rankings, and usage from your recorded suite runs, test runs, and test attempts. This page documents how each metric is defined and where it is available.

Worked example

Consider a single 30-second suite run where checkout.spec.ts fails on attempt 1 in 12 seconds, retries, and passes on attempt 2 in 10 seconds:

  • Suite run outcome and duration: pass, 30s (wall-clock duration of the suite run).
  • Test run outcome and duration: pass, 22s (sum of attempt 1 and attempt 2 durations).
  • Flaky run: Yes (testRun.outcome = pass and testRun.testAttemptsCount > 1).
  • Flake time: 12s (duration of the failed attempt inside this eventually passing test run).
  • Billable minutes: 22s (0.37 minutes, summing both attempts).

Metric overview

MetricDatasetUnitAvailable in
Run count (count)suite-runs, test-runsCountDashboard, CLI, MCP
Suite pass rate (suiteRun.passRate)suite-runsPercentDashboard, CLI, MCP
Test pass rate (testRun.passRate)test-runsPercentDashboard, CLI, MCP
Average duration (average-duration)suite-runs, test-runsDuration (seconds in CLI and MCP)Dashboard, CLI, MCP
Duration percentiles (p50, p75, p95, p99)suite-runs, test-runsDurationDashboard
Flake rate, flaky tests, flakiness score, flake timetest-runs, test-attemptsPercent / Count / DurationDashboard
Most failing tests, slowest teststest-runsPercent / DurationDashboard
Billable minutes (billableMinutes)test-attemptsMinutesDashboard
Most expensive tests (usedMs, retryMs)test-attemptsDurationDashboard

See Analytics for the CLI flags and MCP parameters used to query count, pass-rate, and average-duration.

Volume and pass rate

Run count (count)

Total number of matching rows in the selected dataset (suite-runs or test-runs). On test-runs, count includes skipped test runs unless you filter them out (for example testRun.outcome != skip).

Suite pass rate (suiteRun.passRate)

passed suite runs / total suite runs * 100

A suite run counts as passed when every non-quarantined test run in the suite passed or was skipped. Failed tests covered by an active quarantine rule do not fail the suite run.

Test pass rate (testRun.passRate)

passed test runs / non-skipped test runs * 100
  • Skipped runs are excluded (testRun.outcome != skip) from both numerator and denominator.
  • Retried passes count as passes: A test run that failed on attempt 1 and passed on retry has testRun.outcome = pass.
  • Quarantined failures count as failures: Quarantine prevents a test from failing the suite run, while Endform keeps its real fail outcome in test-run metrics.

Duration and feedback time

Average duration (average-duration)

Arithmetic mean of durationMs across matching runs, returned in seconds by the CLI and MCP server:

  • On suite-runs: Mean wall-clock suite run duration.
  • On test-runs: Mean test run duration (where each test run's duration is the sum of its attempts' durations), excluding skipped test runs.
  • Overall series value: Weighted by the number of observations in each time bucket (sum(bucket value * bucket observations) / total observations), rather than an unweighted average of bucket means.

Duration percentiles (p50, p75, p95, p99)

Shown in Dashboard Analytics charts, the Feedback Time summary, and Suite and Test pages:

  • p50 (median): Half of runs finished at or below this duration.
  • p75, p95, p99: Upper-tail durations showing slower runs and outliers.
  • Exclusions: Test-run percentiles exclude skipped runs (testRun.outcome != skip). Suite-run percentiles use wall-clock suite duration across all completed suite runs in the scope.

Flakiness

Endform classifies flakiness from retry evidence in recorded test runs:

  • Flaky run: A test run that eventually passed after needing at least one retry (testRun.outcome = pass and testRun.testAttemptsCount > 1). A test run that fails all of its attempts is counted as a failure, not a flaky run.

  • Flake rate: flaky runs / non-skipped test runs.

  • Flaky tests count: The number of distinct tests in the selected window that meet both thresholds:

    • At least 5 non-skipped runs (assessableTests counts all tests meeting this minimum).
    • A flake rate of at least 1% (>= 0.01) with at least 1 flaky run.
  • Flakiness score (ranking): Flaky tests in the dashboard are ordered by the 95% confidence Wilson score lower bound (z = 1.96) of flakeRate:

    (p + z^2 / (2n) - z * sqrt((p * (1 - p) + z^2 / (4n)) / n)) / (1 + z^2 / n)

    where p = flaky runs / n and n = non-skipped runs. Using the lower bound prevents a test with few runs (such as 1 flake in 5 runs) from outranking a test with strong evidence of flakiness (such as 40 flakes in 100 runs). Ties break by flakyRuns descending.

  • Flake time: Sum of testAttempt.durationMs across every failed attempt belonging to a flaky (eventually passing) test run. This measures runner time spent on attempts that failed before a retry recovered the test.

Failure and slowness rankings

Most failing tests

Ranks tests by persistent failure rate in the selected window:

  • Excludes skipped test runs (testRun.outcome != skip).
  • Requires at least 25 non-skipped runs and at least 1 failed run.
  • Ordered by the 95% confidence Wilson score lower bound (z = 1.96) of failRate = failed runs / non-skipped runs, with ties broken by failedRuns and totalRuns.

Slowest tests

Ranks tests by non-skipped testRun.durationMs:

  • Sorted by total duration: Sums testRun.durationMs across all non-skipped runs in the window (minimum 1 run). Highlights tests that consume the most cumulative test time.
  • Sorted by average duration: Averages testRun.durationMs across non-skipped runs (requires at least 5 runs). Highlights individual slow tests that set suite wall-clock time.

Usage and cost

Billable minutes (billableMinutes)

sum(testAttempt.durationMs) / 60,000

Summed across all executed test attempts in the window, including retries and quarantined attempts. See Billing for plan details and usage views.

Most expensive tests

Ranks tests within a suite by total attempt time (usedMs = sum(testAttempt.durationMs)), and breaks out retry spend separately (retryMs = sum(testAttempt.durationMs) for attempts with attemptIndex > 0).

Time windows and bucketing

  • Automatic bucket intervals: Time series group data into hour, day, or week buckets (weeks start on Monday). Queries are capped at 1,000 buckets.
  • Timezones: The CLI and MCP server bucket in UTC. The dashboard buckets in your browser's timezone.
  • Empty buckets: CLI and MCP responses omit buckets with zero observations.
  • Period-over-period comparisons: Dashboard summary tiles compare the selected window against the immediately preceding window of the same length.
  • Lookback and retention: CLI and MCP analytics and samples queries accept time periods starting up to 60 days before the request time. Underlying run records are retained according to Security and data.

Last updated