Commit Graph
25 Commits
Author SHA1 Message Date
29a755976b feat(report): record the shard, mark other shards' tests, keep reruns folded (#2151)
* feat(report): record the shard, mark other shards' tests, keep reruns folded

A sharded run's report records run.shard { index, total } and marks each
row another shard runs or reports with skip.otherShard, so a reader never
parses the "outside the shard" reason. A --last-failed rerun folds itself
into the runs before it (report-with-reruns.json, same run id as
report.json), hands reporters that history as lastRun, and keeps the
evidence it names. foldLastRun and the summary tally move into e2e, and
@e2e-dev/github imports them.

Groundwork for merging shard reports (ENG-1239, ENG-1418).

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

* fix(report): fold chained reruns without losing attempts, shard, or usage

Review round 1: a folded row wins over the row a rerun carries, a flaky
test stays flaky when it passes again, a serial member's further repeat
folds its group in, attempts are numbered again, the first run's shard is
kept, and usage is added up. The history file is checked for what the fold
reads and is read by run only, not by list. The marker is worded as this
run's cut, and the config output table names the new file.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

* docs(cli): word the shard marker as this run's cut

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

* fix(report): keep the verdict of a test a rerun never reached

Review round 2: the fold takes the shard from the first run alone, keeps
the earlier verdict and serial group of a test the rerun never reached,
keeps a serial member's attempts on its group, and counts a row without
`selected` as selected. The history check covers serial groups too.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

* fix(report): keep the fold schema-valid when a rerun stops early

Review round 3: a kept verdict carries no skip, so a test a rerun never
reached no longer breaks report-1; an earlier pass is kept too; a row the
first run gave another shard stays as it was; and --last-failed and the
fold read one list of skips that mean the test never ran.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

* fix(report): keep shard ownership and failures clear in rerun history

---------

Co-authored-by: michal-e2e <357875193+michal-e2e@users.noreply.github.com>
Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-24 09:27:39 +00:00
Satyajit Sahoo 23aa697e26 feat(cli): show --step keys under the summary and view the screen and app log (#2015)
* feat(cli): show step keys under the summary and view the screen and app log

The --step and screen.pause() prompt now lists its keys below the live
summary, as --watch does, and the held step row uses a pause glyph.

Press s for the screen's accessibility tree or l for the attempt's app
log. Both open in a scrolling viewer on the alternate screen. The app log
is read from the worker during the hold through a new logs-request and
logs-reply message pair.

The mode without a terminal keeps its text.

* feat(cli): stop the terminal's Duration row while a step is held

The list reporter's Duration row counted wall time, so it kept ticking at
a --step prompt or a screen.pause(). The scheduler now reports when the
first hold opens and the last closes through a run-hold event, and the
row excludes that time, live and in the final summary.

report.json and the reports built from it keep wall time.

* feat(report): add run.durationMs without held time

The report only had the run's start and finish timestamps, so a run that
waited at a --step prompt or a screen.pause() looked as long as the wait.

run.durationMs is the run's duration with held time left out. The
terminal's final Duration row prints the same value. Markdown, the GitHub
comment, the HTML report, and telemetry read it in place of the timestamp
difference. startedAt and finishedAt still record wall time.

A simplification review also removed a few flags and options from the
step viewer and the hold path, and the docs keep each new fact in one
place.

* docs: trim the step viewer changeset and docs

The changeset is down to two sentences. The docs no longer say where the
keys are, since the terminal sample shows it, and the json reporter
section matches main again.

* fix(cli): print the viewer's text before the prompt is repainted

On p, the viewer closed first, so the live window was repainted and then
erased again for the printed text. That left a blank frame. The text is
now queued before the viewer closes, and the window is repainted once.

* fix(cli): number the step prompt by its trace position

The app log view numbered its lines by the recorder's step index, which
counts nested steps, while the prompt counted held steps only. A line
logged inside a nested step could show a different number than the
prompt.

The worker now sends each held step's position in the trace, so the
prompt, the app log view, and the trace page use one number.

The viewer's try blocks are removed too. Nothing received their rethrows,
and the guarded calls don't throw.

* fix(cli): count held time only while every running worker is held

With several workers, a screen.pause() in one test took the time other
tests spent running out of the run's duration. A run could read shorter
than one of its tests. An interval now counts as held only while every
running worker is held. The time limit keeps its rule.

Also from review:
- A routing state an older installed copy made is upgraded in place,
  so claimProcessOutput() no longer throws.
- The viewer holds writes only for terminal streams.
- Ctrl-Z closes the viewer and suspends.
- A failed screen read can be retried during the same hold.
- p is ignored while a read is pending.
- The app log view shows plain text, not Markdown code spans.
- The viewer's help row starts with q, and its headings use the
  redacted title and target.

* test(cli): cover an older dispatcher installed on the streams

The upgrade test seeded a state with no dispatchers. This one installs
an older copy's dispatchers first, then checks that writes are held
while the viewer is open.

The comment on that branch loses its FIXME prefix. It describes what the
code does.
2026-11-21 14:00:20 +01:00
Samanyu DasandClaude Opus 5.5 198d25f038 feat(test): add test.fixme (#1887)
* feat(test): add test.fixme

test.fixme takes the four call shapes test.skip takes. test.fixme(title, fn)
registers a skipped test whose body never runs. test.fixme(), test.fixme(reason),
and test.fixme(condition, reason) skip the running test from a body or hook.
Both report the test skipped with cause explicit and the reason "fixme", or
"fixme: <reason>" when a reason that is not blank is given.

The runtime form shares skipRunningTest with test.skip, which now takes the
API name so every error names test.fixme(). The registration form rejects a
serial group with an API-named message, as test.skipIf and test.runIf do.

Refs #1855

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

* docs(test): say test.fixme's reason and setup error need a non-blank reason and a true condition

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

* fix(test): route test.skip(title, fn) through registrar and mirror test.fixme docs in zh

test.skip(title, fn) in a serial group now names test.skip(), as test.fixme,
test.skipIf, and test.runIf do. docs/zh, which landed on main after this
branch was cut, gets the test.fixme section, the serial-group rows, the Types
block, and the Playwright guide rows.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

* chore(changeset): keep the test.fixme changeset to one sentence

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

* feat(report): report test.fixme with its own skip cause, fixme

A test.fixme test, registered or skipped from its body, now reports
skip.cause fixme in report-v1, beside explicit. The reason text is
unchanged. Every consumer that counted an explicit skip as one the test
gave itself counts fixme too: serial member accounting, Skipped After
Failure, the GitHub merge summary, and NO_TESTS, which says marked fixme.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

* docs(test): document the fixme skip cause, and pin the GitHub merge count

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

* fix(report): keep fixme out of --last-failed, and cover the fixme cause's other paths

A SelfSkipCause type names the causes a test gives itself, and
RUNTIME_SKIP_APIS carries each runtime skip API's cause, so a new one
cannot report half-wired. Tests now pin --last-failed leaving fixme out,
the fixme cause beside a failure that outranks it, and the explicit
fallback for a RuntimeSkip from an older copy. The docs align the
test.skip setup row and say the Playwright guide's { skip: 'fixme' }
workaround reports cause explicit.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

* chore(changeset): tell users to update @e2e-dev/github with e2e for the fixme cause

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

* fix(types): give test.fixme(title, fn) worker fixtures, and name it in the executed docs

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

* ci: rerun checks after a flaky app-command-exit test on Node 24.8.0

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

* docs(migrate): name the serial-group exception for skip and fixme registrations

Playwright accepts test.fixme(title, fn) and test.skip(title, fn) inside a
serial describe, and e2e rejects them, so the "the same" cell names it.
Type a caught runtime skip's cause as unknown, so every reader goes through
runtimeSkipCause, and keep RuntimeSkip module-private. State the github
changeset as the symptom, and name test.fixme in the skip JSDoc.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

* docs: shorten the migrate cell, and name test.fixme in failureBeforeSkip

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

* docs: list test.fixme(title, details, body) as missing, and fix the github changeset

The PR comment never shows the executed count, so the changeset names the
merged report instead. The Playwright guide lists the details form under
the APIs e2e does not have yet.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

* docs(migrate): list Playwright's skip and fixme callback forms as missing

Playwright's test.skip(callback, description) and
test.fixme(callback, description) fail collection in e2e with
COLLECTION_ERROR. The guide now lists them, with the conditional form
inside the body or platforms on the test as the workaround, in en, ja,
and zh. The ja test reference says 直列実行 for serial groups, like the
rest of that page.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

* test(schema): put the fixme skip cause in both report-1 fixtures

The valid fixture's runtime skip, on the result and its attempt, now has
cause fixme. The invalid fixture's skip that names a filter now has cause
fixme, and a test checks that the schema rejects exactly that pair: the
rule that only a filtered skip names a filter fails at that cause, and
deleting the filter clears it.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

* test(test): skip as fixme after a timeout test.setTimeout raised

A test that raises its timeout from 300 ms to 10 s, waits 900 ms, and then
calls test.fixme() is reported skipped with cause fixme, on the result and
its attempt.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

---------

Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-20 15:30:09 +00:00
Krzysztof Moch eddf577526 feat(reporters): build the built-in reporters on the public Reporter API (#1936)
* feat(reporters): build the built-in reporters on the public Reporter API

The built-in list, dot, json, junit, and markdown reporters now use only
the public Reporter contract: factories on e2e/reporters, printsTo for the
terminal stream a reporter prints to (one reporter per stream), live
onOutput, onStepPrompt, and onSummary hooks for any number of reporters,
and reportFiles for files the runner writes atomically. The list and dot
ids beside json print to stderr, so list,json now works as dot,json does.
@e2e-dev/html-reporter writes through reportFiles.

* docs(reporters): bring the Japanese and Chinese reporter pages up to date

Translates the reporter reference, the config reporters table, the
--reporter row, and the debugging output paragraph. In English, the name
section now says a reporter may share a built-in's name, and two lines
read less ambiguously.
2026-11-19 15:58:33 +00:00
Krzysztof MochandOskar Kwaśniewski 17a2e464f0 feat(explore): explore what a pull request changed with --changed-since (#1711)
Co-authored-by: Oskar Kwaśniewski <oskar@okwasniewski.com>
2026-11-12 17:42:01 +00:00
Krzysztof Moch a13380728f feat(html-reporter): write the run as one HTML page (#1642)
* feat(html-reporter): write the run as one HTML page

* fix(html-reporter): match the headline to the listed tests, fence prompts safely, and stop on the reporter signal

* docs(html-reporter): code frames need the test file in the project

* test(e2e): give the JUnit attachment test's finished run a redact
2026-11-10 15:48:15 +01:00
Samanyu DasandClaude Opus 5.5 b8485ba2e7 fix(report): count a serial member executed when its body ran (#1470)
Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-03 10:52:01 +01:00
Oskar Kwaśniewski d181e2645f fix(github): give an e2e explore run its own pull request comment (#1438) 2026-10-28 17:45:34 -07:00
Oskar Kwaśniewski da13624d31 feat(runner): run only the tests a pull request can affect (#1206) 2026-10-23 12:29:15 -05:00
aa9699a688 fix(github): distinguish API throttling from token permissions (#1038)
Co-authored-by: Claude <noreply@anthropic.com>
Co-authored-by: Oskar Kwaśniewski <oskar@okwasniewski.com>
2026-10-16 15:38:08 +02:00
Oskar Kwaśniewski ce4dac3737 fix(github): update only the reporter's own PR comment (#1161)
* fix(github): update only the reporter's own PR comment

* docs(changeset): say any bot author matches for installation tokens
2026-10-15 12:30:10 +02:00
Oskar Kwaśniewski 1b92a6ddfa feat: e2e trace pages replace the Playwright trace (#869) 2026-10-07 11:28:27 +02:00
Oskar Kwaśniewski 8657c8b710 test(mobile): fake clock in engine tests, drop the simulator suite CI never ran (#808)
* test(mobile): fake the clock and shrink PNGs in engine tests, trim duplicates

engine.test.ts 6.4s -> 0.4s: retry backoff and transition budgets on fake timers, small screenshots. Merge or drop tests restating constants or covered elsewhere; prose asserts in errors.test check the headline and recovery only.

* test(mobile): delete the simulator suite no workflow runs

E2E_AGENT_DEVICE_SIMULATOR was never set in CI; the mobile benchmark drives real simulators and emulators. Drops test:simulator and the integration project.

* test(mobile): cover duplicate refind, clipboard step label, unreadable secure screenshot

* test(eas): restore Date.now in afterEach, unique run ids, drop constant asserts

* test(github): drop the factory tautology and markdown asserts core owns

* test(mobile): keep the videoTouches and interactive snapshot option checks

* test(mobile): name the openApp permission refusal by what it checks
2026-10-04 10:10:57 +02:00
Oskar Kwaśniewski 3a9667c046 fix(run): keep --last-failed reruns honest: failure-limit skips, carried debts, kept evidence (#724)
* fix(run): keep --last-failed reruns honest: failure-limit skips, carried debts, kept evidence

--last-failed now reruns tests --max-failures skipped. A test or failed
suite hook another filter leaves out stays owed in the report's new
run.carried until a rerun runs it; the github fold shows carried rows and
errors and stays red while anything is carried. A rerun prunes artifacts/
to what the previous report names and writes its attempts under
artifacts/rerun-<n>/ instead of wiping the tree and reusing attempt paths.

* fix(run): carry a setup's hook debt when no selected test needs it

The report has no row for an unneeded setup, so carryForward now asks the
collection whether a test still exists instead of the report's rows.

* fix(run): reject malformed artifacts in --last-failed reports, tighten rerun docs

Distinct ids in the carried fixture row.

* fix(run): keep carrying tests of a file a narrowed rerun could not collect

* fix(github): a carried interrupted test reads interrupted, not failed, in the folded page
2026-10-03 16:36:53 +02:00
Oskar Kwaśniewski 7ab80bc610 fix(report)!: count interrupted tests apart from failures (#713)
* fix(report)!: count interrupted tests apart from failures

* fix(report): tell a failed test from its last failed attempt, whatever the cut retry left
2026-10-03 09:30:44 +02:00
Oskar Kwaśniewski 62bfe0a896 fix(github): long marker fields keep a digest so distinct keys never share a comment (#720)
* fix(github): long marker fields keep a digest so distinct keys never share a comment

* docs(changeset): note one-time duplicate for long marker fields
2026-10-02 18:17:26 +02:00
Oskar Kwaśniewski 67c29fc6b2 chore!: publish engines and reporter under the @e2e-dev npm scope (#602) 2026-09-28 19:05:05 +02:00
Oskar Kwaśniewski 61603e6c2c fix(github): a --last-failed rerun updates the pull request comment as one run (#537) 2026-09-25 17:09:09 +02:00
Oskar Kwaśniewski cdc41098c7 fix(report): markdown cells cannot mention, autolink, or start a block, and all-dot names are rejected (#448) 2026-09-23 10:53:49 +02:00
Oskar Kwaśniewski b71ecc0f09 fix(report): leave unselected results off the page and JUnit, link sources under the project path (#422) 2026-09-22 18:14:28 +02:00
Oskar Kwaśniewski 2e593dfb46 fix(agent): recover semantic timeouts with masked pixels (#317)
* fix(agent): recover semantic timeouts with masked pixels

Distinguish unavailable semantics from an empty tree so a proven fresh screenshot can remain useful without supporting an absence judgment. Reserve time for independent masking, reject stale references, and stop trace replay or recording after evidence degrades.

Respect judgment vision settings and attempt pixel taint. Keep device capture closed when accessibility bounds cannot prove masking. Report pre-model capture failures without inventing a revision or verdict.

* fix(agent): isolate fallback capture and evidence ownership

Reserve document node IDs before readers run and bound the entire semantic transaction, including metadata and handle readback. Quarantine late handles and publish each capture only while its page and generation remain current.

Carry semantic or pixel evidence through the internal session and agent paths. Preserve completed cache captures for one executor handoff, retire semantic presentation history on fallback, and keep public interfaces extendable.

* test(agent): align capture assertions with cache handoff

Count the reused cache observation once and wait for the fixture delayed control before asserting an unchanged screen after batched actions.

* docs(agent): clarify fallback without act vision modes

* test(agent): cover requested pixels after semantic fallback

* test(playwright): wait for recorded paint in lifecycle coverage

* test(playwright): flush a frame before checking video paint
2026-09-15 13:47:30 +02:00
Oskar Kwaśniewski c2c5df7df9 feat(e2e)!: the runner publishes as e2e; @e2edev/e2e is retired (#294) 2026-09-14 08:56:22 +02:00
Oskar Kwaśniewski 8811ba7de9 feat(report): a markdown reporter writes the run as summary.md, with an exploration's findings, and the GitHub comment renders from it (#284) 2026-09-12 15:54:10 +02:00
Oskar Kwaśniewski 8287bf930b feat(run)!: run one test as several agents; --agent takes a list (#262) 2026-09-11 10:03:35 +02:00
Oskar Kwaśniewski a0a4df01b4 feat(github): the GitHub reporter comments on the pull request from Actions (#246) 2026-09-10 14:47:36 +02:00