> Every page of the Heythere docs is listed in https://heythere.io/docs/llms.txt: fetch it to find a page instead of guessing its URL.

# Tests: try a WhatsApp automation on your own phone

> Try an automation's draft on your own phone before any customer sees it, as yourself or as a simulated contact, at any time of the week, and see how each step went.

Before the repair shop publishes the automation that answers "Is my bike ready?", its owner tries the draft on their phone. That is a test: an [automation](https://heythere.io/docs/concepts/automations)'s draft running on a workspace member's phone, before any [version](https://heythere.io/docs/concepts/versions) is published. It messages from Heythere Playground, Heythere's number for tests, not the automation's [number](https://heythere.io/docs/concepts/whatsapp-connection), so it counts no conversation.

## How does a test start?

A member selects Test on the automation's console page, or their agent calls `createAutomationTest` and gives them its `url`. The test copies the draft; the page shows a link and QR code to Heythere Playground. The member's next message to it starts the [run](https://heythere.io/docs/concepts/runs) at the draft's `message.received` trigger. Starting a test refuses what publishing would, but checks only that trigger and the steps it reaches, and a test sends no template.

Only the member who started it receives it, on their sign-in number. Starting another test ends it.

## Which contact does a test play?

The member's [contact](https://heythere.io/docs/concepts/contacts), or a simulated contact picked under Play as, such as a Camille whose bike is ready. The agent building the automation sets each simulated contact's attributes, consents, language and creation date with `replaceAutomationSimulatedContacts`, one per path. Later tests keep the pick.

## At what time does a test play?

Now, or at a time the member picks under Play at (`playAt`), such as a Saturday evening, to see the automation outside opening hours without touching the workspace's [variables](https://heythere.io/docs/concepts/variables). The run's time starts there and moves on. Waits of type duration, date or opening end at once, jumping the test's time to their end; webhook and polling waits take real time.

## What does a test change?

Nothing a contact sees. Contact values go to the test's own copy of the contact it plays, a `handover` step ends the test, and its messages and run appear in no conversation or list of runs. It reads voice notes as their transcript, bills its AI requests and transcriptions like any [AI](https://heythere.io/docs/concepts/ai) request, and really sends its `http_request` steps.

## When does a test end?

With its run, when stopped with `stopAutomationTest`, when the member starts another, or 24 hours after their last message.

## How do a member and an agent follow a test?

The console page marks the steps and transitions the run took. Its log groups the run's workspace log by step, and selecting an entry shows where the run stood. An agent reads the test with `getAutomationTest`, and the run's decisions with `listWorkspaceLog` and its `automationRunId`.

## In the API

Every operation is a REST endpoint and, unless marked REST only, an MCP tool of the same name. [The OpenAPI document](https://app.heythere.io/api/openapi.json) describes their parameters, payloads, and errors.


- `createAutomationTest`: Test an automation's draft. `POST /api/organizations/{organizationId}/workspaces/{workspaceId}/automations/{automationId}/tests`
- `getAutomationTest`: Get an automation test. `GET /api/organizations/{organizationId}/workspaces/{workspaceId}/automations/{automationId}/tests/{automationTestId}`
- `listAutomationTests`: List automation tests. `GET /api/organizations/{organizationId}/workspaces/{workspaceId}/automations/{automationId}/tests`
- `stopAutomationTest`: Stop an automation test. `POST /api/organizations/{organizationId}/workspaces/{workspaceId}/automations/{automationId}/tests/{automationTestId}/stop`
- `replaceAutomationSimulatedContacts`: Replace an automation's simulated contacts. `PUT /api/organizations/{organizationId}/workspaces/{workspaceId}/automations/{automationId}/simulated-contacts`
