https://retellai.com/?utm_source=discord&utm_medium=seo logo
I want to import test cases but I dont know the fo...
# ❓・ai-evy-support
u
@AI Evy I want to import test cases but I dont know the format of the json file. What should it look like?
a
Thanks for tagging me @-Ace. I'll look through relevant sources and get back to you shortly.
### Answer The exact JSON schema for importing test cases isn't explicitly documented. However, based on the API and community guidance, here's what we know: Recommended approach: Create a few test cases manually in the Simulation dashboard with all the features you need (dynamic variables, mock function results, etc.) , then export them by checking the box on the left and clicking export. This gives you a baseline template to replicate for your test suite. [(1) ]() Based on the API structure, each test case includes these fields: [(2) ]() -
name
(required) — Name of the test case -
user_prompt
(required) — User prompt to simulate -
metrics
(required) — Array of metric names to evaluate -
response_engine
(required) — Response engine configuration -
dynamic_variables
(optional) — Dynamic variables to inject -
tool_mocks
(optional) — Mock tool calls for testing -
llm_model
(optional) — LLM model to use (e.g.,
gpt-4.1
,
gpt-4.1-mini
,
claude-4.5-sonnet
) Example structure from a test case: [(3) ]()
Copy code
json
{
   "name": "Normal Flow - Printer Offline Issue",
   "dynamic_variables": {
      "assigned_tech": "John Martinez",
      "ticket_number": "T20231222-0145"
   },
   "metrics": [
      "Ticket created successfully",
      "User received ticket number"
   ],
   "user_prompt": "Hi, my name is Alex Johnson...",
   "type": "simulation",
   "tool_mocks": [],
   "llm_model": "gpt-4.1-mini"
}
For batch import, the file likely needs to be an array of test case objects, but the exact top-level structure isn't documented. Your safest bet is to export existing test cases first to see the exact format.
​ To learn more, see the sources I considered: [[1] Discord message from @webb_100 on 2025-10-17](https://discord.com/channels/1186424376300679209/1186462578310910112/1428567515860046024) [[2] Create Test Case Definition](https://docs.retellai.com/api-references/create-test-case-definition) [[3] Simulation environment MCP errors for Single-Prompt Agents - tool response 'not connected'](https://community.retellai.com/t/simulation-environment-mcp-errors-for-single-prompt-agents-tool-response-not-connected/253) ​
Feel free to tag @AI Evy with additional questions. I also appreciate feedback, it helps me improve.