Skip to main content
A simulation test runs a saved scenario against your agent without placing a call, and grades each run pass or fail. Build a set of test cases for the behavior that matters, then rerun them after every prompt, flow, or setting change to catch what broke before it reaches a real caller. For example, a dental clinic keeps a test case where the caller wants to reschedule, has no appointment on file, and gets impatient. Its success criteria check that the agent looks up the record, offers to book a new visit instead, and never makes up an appointment time. If a prompt change breaks any of that, the run fails.

When to use it

  • Before every release, to check that a change didn’t break behavior that used to work.
  • To cover edge cases that are slow to reproduce by hand: an angry caller, a refusal to verify identity, a function that returns no results.
  • To measure speech recognition on the names, numbers, and accents your callers actually use.
  • From real failures, so a problem a caller hit once becomes a check that guards against it returning.
To try a change by hand first, use manual testing.

Test types

Text tests are the fastest and cheapest, so keep most of your suite in text and add audio tests for what only speech can show. See Text and audio tests and Transcription tests.

Where to find it

Open your agent and select Simulation in the left rail of the editor. The Simulation Testing page has two tabs:
  • Test Cases lists every test case for the agent, where you create, import, edit, and run them.
  • Simulation Runs lists every batch you’ve run, with each run’s result. See Run and review tests.
You can also run text and audio test cases one at a time from the Simulation Test tab of the test panel. Those single runs aren’t saved to Simulation Runs.
Simulation Testing page for a medical receptionist agent, on the Test Cases tab. The type filter shows All, Audio, Text, and Transcription, with Import and Add test buttons above it. On the right, the tag filter reads Tags: Scheduling, Safety, Refills and is open, saying it shows test cases with any of these tags, with Scheduling, Safety, and Refills checked. The list holds the seven matching test cases, each with a type icon: one transcription test (Refill caller name and medication), two audio tests (Reschedule from a busy street, Chest pain goes to clinical staff), and four text tests. Each row shows its tags, the caller instructions, the success criteria, and Edit, Run, and Delete buttons.

The Test Cases tab lists every text, audio, and transcription test case for the agent. Filter it by type or by tag.

How a run is graded

Text and audio runs pass only if every success criterion passes. A prompt criterion is judged by an LLM against the transcript and comes back with its own reason. An equation criterion compares a variable or metric to a value, with no LLM involved. See success criteria. Transcription runs pass only if the word error rate is at or below your limit and every required word was heard. See how a transcription test is graded. Each run ends with one of these results: Common reasons a run ends in Error:
  • The conversation went past 400 messages, or Retell detected a loop.
  • The agent didn’t answer 4 caller messages in a row.
  • An audio run ended some other way than a hangup, such as reaching the agent’s maximum call duration.
  • The run hadn’t finished 24 hours after the batch started.
Both the AI caller and the grader are LLMs, so the same test can pass one run and fail the next. Run a test case several times and judge it on its pass rate, not on a single run.

What a test case contains

A text or audio test case describes a caller and how to grade the conversation:
  • Caller instructions: who the caller is and what they want, or a transcript for the caller to follow.
  • Success criteria: the checks that grade the run.
  • Performance metrics: optional measurements such as hallucination rate or latency.
  • Starting point: optionally, the node to start from and the first few messages.
  • Dynamic variables and function mocks, so the run is realistic and repeatable.
An audio test case adds a caller voice and optional background noise. A transcription test case is different: it holds a recording, the expected transcript, and an error-rate limit.

Agent support

  • Custom LLM agents aren’t supported. Runs fail with “Custom LLM agents do not support simulation tests.”
  • Chat agents support text tests only.
  • Agents on a duplex model (gpt-live-1 and gpt-live-1.1) don’t support audio tests.
  • Flows in flex mode always start from the start node, so a test case’s starting node doesn’t apply.

Manage test cases

On the Test Cases tab, filter the list by type, or click Filter by tags to filter by tags. Use each row’s Edit, Run, and Delete buttons. Check several rows to run, export, or delete them together. Deleting can’t be undone.

Import and export test cases

To copy test cases to another agent, check them and click Export. They download as a JSON array, test-cases-<agent ID>.json. On the other agent, click Import and drop the file in. A file can hold up to 100 test cases and be up to 5 MB, and each item needs a type of text, audio, or asr (transcription). Retell checks every item before saving any of them, so a file with one invalid test case imports nothing. To start from scratch, download the JSON template from the import dialog.

FAQ

Yes, unless you mock them. Any function you don’t mock runs for real, so a test can create a real booking or record. Text tests always call MCP tools for real. Transfers and SMS are always simulated in a simulation test, so they can’t reach a real phone. See function mocks.
The caller and the grader are both LLMs, so runs vary. Run the test case several times, up to 10 runs per batch, and look at the pass rate. If it fails often, tighten the success criterion or the agent’s prompt.
The version you’re viewing when you start the run. The run settings dialog shows it before you start. See Run and review tests.