> ## Documentation Index
> Fetch the complete documentation index at: https://docs.browserbase.com/llms.txt
> Use this file to discover all available pages before exploring further.

# UI test

> Test UI changes with a browser agent that checks user flows, edge cases, accessibility, and responsive layouts, then reports reproducible failures.

The `ui-test` skill guides your coding agent through testing in a real browser. It can focus on changes in a Git diff or explore an app for functional, accessibility, and responsive layout issues.

## Install

```bash theme={null}
npx skills add browserbase/skills --skill ui-test
npm install -g browse
```

Start your app's development server for local testing. For remote Browserbase sessions, set `BROWSERBASE_API_KEY`. If the deployed app requires login, install [Cookie sync](/integrations/skills/cookie-sync) and prepare an authenticated context.

## Test a change

Give your agent the app URL and the scope to test:

```text theme={null}
Use ui-test to check my current Git diff at http://localhost:3000.
Test the affected user flows, empty and invalid inputs, keyboard navigation,
and mobile layout. Include reproduction steps and screenshots for failures,
and report any tests you couldn't complete.
```

For broader coverage, ask it to explore a deployed preview:

```text theme={null}
Use ui-test to explore https://preview.example.com. Focus on product search,
filtering, and navigation. Check error states and narrow-screen layouts,
then produce a report with evidence for each failure.
```

## Review the findings

Your agent reports passed, failed, and skipped tests, with expected and observed behavior for failures. It saves failure screenshots under `.context/ui-test-screenshots/` and an HTML report at `.context/ui-test-report.html`.

Review skipped tests as coverage gaps. If a page fails to load, confirm the app server or preview is reachable before rerunning. For remote authentication failures, refresh the context with Cookie sync.

## Further reading

<CardGroup cols={2}>
  <Card title="Cookie sync" icon="cookie-bite" href="/integrations/skills/cookie-sync">
    Prepare authenticated sessions for deployed previews.
  </Card>

  <Card title="Skill source" icon="github" href="https://github.com/browserbase/skills/tree/main/skills/ui-test">
    View test workflows and report examples.
  </Card>
</CardGroup>


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.