suiss/ui · AI
Test Results
A test run by the agent, with a summary, its suites and the error for each failure.
Test Results is a test run by the agent. The summary row counts what passed and failed. Open it to see each suite, its tests, and the error for each failure.
The run and each suite are a TraceCollapsible, and each failed test opens into a Code Block with its error.
Installation
Test Results is built with the Trace and Code Block components.
Works in any project with a components.json. See Installation for the one-line registry setup. Or use the suiss/ui CLI:
Usage
With React Aria, use defaultExpanded on TraceCollapsible in place of defaultOpen.
Examples
Suites
Groups tests by file. Each suite is a collapsible row with a Trace of its tests, and the suites with a failure start open.
AI SDK
Run the tests as a tool and render its output. The tool states map the same way as in Tool.
API Reference
See Trace and Code Block.
Accessibility
- Put the counts in the summary title, such as "Ran 8 tests, 2 failed", so the result is read before the row is opened.
- A failed run, suite or test sets
status="error", and its title names what failed, so the state is not shown by color alone.