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

# Test with localhost

> Use ngrok to expose a local app on localhost:3000 so Stably can test it from a cloud browser.

When your app is running on `localhost:3000`, a Stably cloud browser cannot reach it directly because it is only available on your machine. Use a secure tunnel like [ngrok](https://ngrok.com) to create a public HTTPS URL that forwards to your local server.

## 1. Start your app

Run your app locally and confirm it is available at `http://localhost:3000`.

```bash theme={null}
npm run dev
```

## 2. Start an ngrok tunnel

Install ngrok from [ngrok.com/download](https://ngrok.com/download), then run:

```bash theme={null}
ngrok http 3000
```

ngrok will print a forwarding URL like this:

```text theme={null}
Forwarding  https://abc123.ngrok-free.app -> http://localhost:3000
```

Keep this terminal open while Stably runs your tests.

## 3. Use the ngrok URL in Stably

Copy the HTTPS forwarding URL and use it as the target URL in Stably.

For example, instead of testing:

```text theme={null}
http://localhost:3000
```

test:

```text theme={null}
https://abc123.ngrok-free.app
```

If your test starts on a specific route, append the route to the ngrok URL:

```text theme={null}
https://abc123.ngrok-free.app/dashboard
```

## Tips

* Restarting ngrok usually creates a new URL, so update the URL in Stably after each restart.
* Keep both your local app server and the ngrok tunnel running for the full test run.
* If your app uses OAuth callbacks, webhooks, or allowed origins, add the ngrok URL to the relevant allowlist while testing.
* For local-only CLI runs on your own machine, you can still point tests directly at `http://localhost:3000`.

## Writing Playwright tests with Orca

You can also write Playwright tests in [Orca](https://onorca.dev), Stably's open source agent IDE. Orca helps you work directly in your codebase, create or edit Playwright tests, and iterate against your local development server.


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