Skip to content

feat(browser): show trace steps timeline on terminal on test failure - #11594

Merged
sheremet-va merged 27 commits into
vitest-dev:mainfrom
hi-ogawa:feat/issue-11592
Oct 20, 2026
Merged

sheremet-va merged 27 commits into
vitest-dev:mainfrom
hi-ogawa:feat/issue-11592

Conversation

@hi-ogawa

@hi-ogawa hi-ogawa commented Oct 15, 2026 •

Copy link
Copy Markdown
Collaborator

TODO


When a browser-mode test fails, the error shows what failed but not the steps that led there, which is often what you need for a flaky async test. The trace view records that sequence, but it's only visible in Vitest UI, the browser UI, and the HTML reporter.

This PR extends default reporter error output to include trace steps as a text table under. The timeline is rendered from the trace data the reporter already receives, so trace collection is unchanged.

Example

VITE_FAIL_TEST=1 pnpm --dir examples/lit test --run --browser.traceView --browser.headless
image

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

netlify Bot commented Oct 15, 2026 •

Copy link
Copy Markdown

✅ Deploy Preview for vitest-dev ready!

Built without sensitive environment variables

Name Link
🔨 Latest commit bba08db
🔍 Latest deploy log https://app.netlify.com/projects/vitest-dev/deploys/6ad5f315c1d499086c85f950
😎 Deploy Preview https://deploy-preview-11594--vitest-dev.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.
🤖 Make changes Run an agent on this branch

To edit notification comments on pull requests, go to your Netlify project configuration.

hi-ogawa and others added 5 commits October 15, 2026 18:38
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
hi-ogawa and others added 3 commits October 15, 2026 19:55
Moved to vitest-dev#11604

This reverts commit e4a8e37.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Wait for vitest-dev#11232 to pick the trace of each error's attempt.

This reverts commit dfc1db1.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
hi-ogawa and others added 10 commits October 16, 2026 16:11
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@hi-ogawa hi-ogawa changed the title feat(browser): print trace timeline on test failure feat(browser): print trace steps timeline on test failure Oct 16, 2026
@hi-ogawa hi-ogawa changed the title feat(browser): print trace steps timeline on test failure feat(browser): show trace steps timeline on terminal on test failure Oct 16, 2026
hi-ogawa and others added 4 commits October 16, 2026 18:07
Put the step name first with tree glyphs for page.mark() groups, show the
start as an offset, and print `-` for empty cells.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@hi-ogawa hi-ogawa added this to the 5.1.0 milestone Oct 16, 2026
@hi-ogawa
hi-ogawa marked this pull request as ready for review October 16, 2026 09:48
sheremet-va
sheremet-va previously approved these changes Oct 19, 2026
@sheremet-va

Copy link
Copy Markdown
Member

Needs duration to be aligned to the right and always use ms or s

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
hi-ogawa and others added 3 commits October 19, 2026 19:31
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Show the browser trace timeline in test failure output

2 participants