> 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.](/_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](/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. ## Docs - [Write test cases](https://docs.sarvam.ai/conversations/build/tests/write-test-cases.md) - [Run tests & review results](https://docs.sarvam.ai/conversations/build/tests/run-tests.md)