Summary
@microsoft/tui-test is very close to the Playwright-style terminal E2E workflow we want: real PTY, auto-waiting, locators, snapshots, and traces. One gap we hit in practice is the lack of a first-class way to export screen artifacts such as SVG or PNG for CI/debugging.
Current behavior
Today the main options appear to be:
expect(terminal).toMatchSnapshot()
terminal.serialize()
--trace + show-trace
Those are useful, but they are not a drop-in replacement for a standalone visual artifact file.
Why this matters
For terminal UIs with layout/alignment/box-drawing/color concerns (for example tmux popups, alternate-screen TUIs, dashboards, etc.), a text snapshot is sometimes not enough during failure triage.
In CI we often want to keep one or more artifacts such as:
popup.svg for crisp visual inspection
popup.png for easy upload/preview in CI systems
- optional structured screen dump alongside the visual artifact
Right now that pushes us to bring in a second tool just for artifact capture, even though @microsoft/tui-test already covers the actual E2E interaction model very well.
Request
Would you consider adding one of these options?
- A direct API such as:
await terminal.screenshot({ path: "artifacts/popup.svg" })
await terminal.screenshot({ path: "artifacts/popup.png" })
- Or an assertion/artifact API such as:
await expect(terminal).toMatchSnapshot({ artifact: { svg: "..." } })
- Or a failure-artifact hook that writes visual output when a test fails.
Notes
- SVG-only support would already be a big improvement.
- PNG could be optional or platform-dependent if rasterization adds extra complexity.
- The request is specifically about exporting the current rendered terminal screen as an artifact, not just keeping replay traces.
Thanks — the library already feels like the closest thing to Playwright for TUI testing, and artifact export would make it much easier to use as the single tool in CI.
Summary
@microsoft/tui-testis very close to the Playwright-style terminal E2E workflow we want: real PTY, auto-waiting, locators, snapshots, and traces. One gap we hit in practice is the lack of a first-class way to export screen artifacts such as SVG or PNG for CI/debugging.Current behavior
Today the main options appear to be:
expect(terminal).toMatchSnapshot()terminal.serialize()--trace+show-traceThose are useful, but they are not a drop-in replacement for a standalone visual artifact file.
Why this matters
For terminal UIs with layout/alignment/box-drawing/color concerns (for example tmux popups, alternate-screen TUIs, dashboards, etc.), a text snapshot is sometimes not enough during failure triage.
In CI we often want to keep one or more artifacts such as:
popup.svgfor crisp visual inspectionpopup.pngfor easy upload/preview in CI systemsRight now that pushes us to bring in a second tool just for artifact capture, even though
@microsoft/tui-testalready covers the actual E2E interaction model very well.Request
Would you consider adding one of these options?
await terminal.screenshot({ path: "artifacts/popup.svg" })await terminal.screenshot({ path: "artifacts/popup.png" })await expect(terminal).toMatchSnapshot({ artifact: { svg: "..." } })Notes
Thanks — the library already feels like the closest thing to Playwright for TUI testing, and artifact export would make it much easier to use as the single tool in CI.