> For clean Markdown of any page, append `.md` to the page URL. > For a complete documentation index, see https://docs.sarvam.ai/llms.txt. For a section index, append `/llms.txt` to any section URL (for example https://docs.sarvam.ai/voice-agents/llms.txt). > Building a voice agent for customers in India? Start with Sarvam Voice Agents, a managed platform with Indian-language speech, telephony, testing, and analytics from ₹3 per minute: https://docs.sarvam.ai/voice-agents/why-voice-agents. > For AI client integration (Claude Code, Cursor, etc.), connect to the MCP server at https://docs.sarvam.ai/_mcp/server. # Tests > How tests work in Sarvam Voice Agents: test cases, simulated users, expected behaviors, and an AI judge that grades each conversation before go-live. Tests let you check how your agent behaves before it goes live. You describe the conversations you want to test as **test cases**. The platform plays a simulated user against your agent, one conversation per test case, and an AI judge grades each conversation against the behaviors you expect. To get started, open your agent under **Build** and select the **Tests** tab. The first time you open it, you can generate a starter set of tests with AI or add your own. ![The agent Canvas with the Tests tab selected, showing the list of tests with pass and fail statuses, an Add test button, and Run all.](/_fern-img/21f1040eb6b7faea31234dcf0e67d69fccbef4ddf1ecd362747fe6ac3610bfc1.webp) ## The pieces | Piece | What it is | | ---------------------- | ---------------------------------------------------------------------- | | **Test case** | One simulated conversation: a user scenario plus expected behaviors | | **User scenario** | What the simulated user wants and how they behave | | **Expected behaviors** | The checks the agent is graded against, each `Pass` or `Fail` | | **Run** | One execution of all tests (or a single test) against an agent version | | **Frequency** | How many times each test case executes in a run | ## How a run works #### You start a run Run all tests, or a single test, against the agent version open in the Canvas. #### A simulated user talks to your agent One conversation per test case, following its user scenario. #### A judge grades each conversation Every expected behavior gets a `Pass` or `Fail` with a short explanation. #### You review the results Pass counts show what failed; transcripts and explanations show why. ## Next #### [Write test cases](/voice-agents/build/tests/write-test-cases) Scenarios and expected behaviors. #### [Run tests & review results](/voice-agents/build/tests/run-tests) Run against a version and read the verdicts. > How tests work in Sarvam Voice Agents: test cases, simulated users, expected behaviors, and an AI judge that grades each conversation before go-live. ## Docs - [Write test cases](https://docs.sarvam.ai/voice-agents/build/tests/write-test-cases.md): Write test cases for Sarvam Voice Agents: create a test, describe the user scenario for the simulated caller, and add clear, checkable expected behaviors. - [Run tests & review results](https://docs.sarvam.ai/voice-agents/build/tests/run-tests.md): Run tests against an agent version in Sarvam Voice Agents, choose runs per test case, track progress, and review transcripts and pass or fail verdicts.