> 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 full documentation content in one file, see https://docs.sarvam.ai/llms-full.txt.
> For AI client integration (Claude Code, Cursor, etc.), connect to the MCP server at https://docs.sarvam.ai/_mcp/server.

# Tests

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.](https://fdr-prod-docs-files-public.s3.us-east-1.amazonaws.com/sarvam-api-docs.docs.buildwithfern.com/21f1040eb6b7faea31234dcf0e67d69fccbef4ddf1ecd362747fe6ac3610bfc1/voice-agents/images/tests-tab.png?X-Amz-Algorithm=AWS4-HMAC-SHA256&X-Amz-Content-Sha256=UNSIGNED-PAYLOAD&X-Amz-Credential=AKIA6KXJSKKNFOCF7G4B%2F20260917%2Fus-east-1%2Fs3%2Faws4_request&X-Amz-Date=20260917T064425Z&X-Amz-Expires=604800&X-Amz-Signature=999b344dc1318a85b3337d5a5a87416338d5064d7385a970fd071156984ab6a4&X-Amz-SignedHeaders=host&x-amz-checksum-mode=ENABLED&x-id=GetObject)

## 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](/conversations/build/tests/write-test-cases)

Scenarios and expected behaviors.

#### [Run tests & review results](/conversations/build/tests/run-tests)

Run against a version and read the verdicts.