ReferenceResults

Suites, tests, and attempts

How Endform organizes results into suites, suite runs, test runs, and test attempts, and how it recognizes the same test across runs.

When Playwright retries a failing test, Endform does not record two separate test results. Instead, it keeps one test run and records each try as a test attempt inside it. That separation is why Endform organizes results into four levels: a suite has suite runs, each suite run has test runs, and each test run that executes has one or more test attempts. A test skipped at discovery still gets a test run with a skip outcome, but no attempts.

Hierarchy of Endform results: a Suite (identified by repo and directory) contains Suite runs over time (such as Suite run #41 and Suite run #42). Suite run #42 contains Test runs (checkout and login). The checkout test run has two Test attempts (Attempt 1 failed, Attempt 2 retried and passed), showing that retrying a test adds another attempt inside the same test run, while the login test run has one passing attempt.

Why test runs and test attempts are separate

A single test in a Playwright run can execute more than once when retries are enabled. Separating test runs from test attempts lets Endform preserve both the final result and what happened along the way:

  • One test run per test per project: A suite run has a single test run for a given test in a given Playwright project, regardless of how many times it retried. With --repeat-each, each repeat is its own test run under the same test.id, and retries stay inside their repeat.
  • One test attempt per try: Every execution of that test (the initial try and each retry) is recorded as its own attempt with its own outcome, duration, error message, replay, and trace.
  • Clear signal for flakes: A test run whose final outcome is pass with more than one attempt (testRun.testAttemptsCount > 1) passed only on retry. Without separate attempts, retries would hide flaky tests behind green runs or double-count them in pass rates.

The four levels

LevelWhat it representsExamples of what it records
SuiteA Playwright test suite in a repository and directoryStable suite.id, repository, directory, default branch
Suite runOne execution of endform testsuiteRun.id, overall outcome (pass or fail), wall-clock duration, git branch and commit SHA, max attempts
Test runOne test in one Playwright project within a suite runtestRun.id, test.id, Playwright projectName, outcome (pass, fail, or skip), attempt count, total attempt duration, quarantine rule (if matched)
Test attemptOne try of a test run (initial try or a retry)testAttempt.id, attempt index (0 for the first try, 1+ for retries), outcome, duration, error message and location, replay and trace

How outcomes and durations roll up

Outcomes and durations aggregate differently at each level:

  • Attempts to test run: If a test is skipped at discovery or any attempt is skipped, the test run outcome is skip. Otherwise, if any attempt passes (including on a retry), the test run outcome is pass. If every attempt fails, the test run outcome is fail.
  • Test runs to suite run: A suite run passes when every non-quarantined test run is pass or skip. A quarantined test runs once without retries and keeps its real fail outcome in Endform history and analytics, without failing the suite run. See Custom reporters for how merged Playwright reports represent quarantined results.
  • Durations: A suite run's duration is wall-clock time from start to finish. A test run's duration is the sum of its attempts' durations rather than wall-clock span, so parallel retries and file batching do not distort how long the test spent running.

How Endform recognizes the same test across runs

Endform tracks a test's history across suite runs by assigning a stable test.id scoped to its suite.

  • Suite identity: Determined by (organization, repository, directory).
  • Test identity: Determined by (suite, file path, describe blocks, test title).

Because test identity is based on file path, test.describe nesting, and test title, some refactors preserve history while others start a new test record:

Change you makeSame test.id?Effect on history and quarantine
Edit test code, assertions, or tags set with the tag optionYesHistory continues under the same test
Move the test to a different line in the same fileYesHistory continues under the same test
Run the test in multiple Playwright projects (such as chromium and webkit)YesShares one test.id; each project creates its own test run with projectName
Rename or move the spec fileNoCreates a new test.id with fresh history; quarantine rules tied to the old test.id stop matching
Rename or restructure a test.describe blockNoCreates a new test.id with fresh history; existing quarantine rules stop matching
Rename the test title, including adding or removing a tag written in the title (such as @smoke)NoCreates a new test.id with fresh history; existing quarantine rules stop matching

Last updated