# Testing

> Test an agent's logic, voice and phone path before it takes a real call.

Source: https://docs.vlayers.ai/build/testing

Kind: How-to guide

## What you'll learn

The three ways to test an agent and what each one can and cannot prove. Use them in order: the cheap ones catch logic bugs, and only a real call proves a transfer.

| Test | Where | It proves | It cannot tell you |
|---|---|---|---|
| **Dry run** | In the flow builder, over text | What the agent does between turns: saved values, API calls, branches. It runs the real engine, so routing and captures match a call. | Anything about audio. Transfers are simulated, and each send replays the conversation from the start, so an AI step can word things differently. |
| **Test call** | A voice call from your browser, no number needed | Pacing, interruptions and pronunciation. | Whether transfers work: a browser caller has no phone line. |
| **Real call** | A phone calling the agent's number | The whole path: carrier audio, caller ID and transfers. | Nothing: always do one before a customer does. |

## Prerequisites

- An agent. For the real call, a number assigned to it. See [Phone numbers](https://docs.vlayers.ai/build/numbers).

## Step 1: Dry-run the logic

In the flow builder, open **Dry run** and type as the caller. Each saved value shows inline and the path is highlighted on the canvas, so you see which step failed to capture something.

## Step 2: Make a test call

Open **Dashboard → Playground**, pick the agent and talk to it by voice. Interrupt it on purpose. Pause mid-sentence. Say a proper noun and see whether speech-to-text hears it.

## Step 3: Make a real call

Call the agent's number from a phone. If the agent transfers, trigger the transfer and check the person is briefed. See [Transfers](https://docs.vlayers.ai/build/transfers).

## Step 4: Read the call afterwards

Open the call under **Dashboard → Conversations**. The transcript shows the conversation with the agent's actions inline (API calls, saved variables, each step of a transfer), with failures in red where they happened. Most "why did it do that?" questions are answered by reading it top to bottom.

## Which test answers which question

| Question | Use |
|---|---|
| Does it capture what I need? | Dry run |
| Does it take the right branch? | Dry run |
| Does it sound human? | Test call |
| Can I interrupt it? | Test call |
| Does the transfer work? | Real call |
| Does caller ID work? | Real call from the phone you expect to be recognised |

For repeatable checks, **Dashboard → Tests and evals** runs scripted conversations with pass/fail checks per turn, and call scoring rates real calls with an AI judge.

## Test it: the go-live checklist

- One real phone call, end to end, including a transfer.
- Interrupt the agent mid-sentence and confirm it stops.
- Act as a caller who answers nothing useful, goes silent, goes off-topic or asks for a person straight away.
- Confirm the transfer destination is a line someone answers.
- Listen to the numbers it reads aloud: `TKT-5001` should not be spelt out letter by letter. See [Voice and turn-taking](https://docs.vlayers.ai/build/voice).

## Common problems

| Problem | Fix |
|---|---|
| The dry run and the live call behave differently | The dry run uses the last saved draft; callers get the published version. Publish and deploy again. |
| A playbook answers differently each run | Expected: AI steps can word things differently. Check it reaches the right outcome, not the same words. |

## Next steps

- [Limits and troubleshooting](https://docs.vlayers.ai/build/limits): What usually goes wrong, and the fix.
- [Test mode for messaging](https://docs.vlayers.ai/developers/test-mode): Test SMS, WhatsApp, Telegram and Discord through the API at no cost.
