Create several test cases at once
case.create_batchChanges dataCreates, updates or deletes something in your workspace.What it does
Creates up to 200 test cases in one call and can file them all under a feature or user story. Use it when you turn a feature's acceptance criteria into tests (an acceptance criterion, AC, is one testable promise the feature makes) or when saving the drafts from exploration.to_cases. Call case.list first to avoid duplicates. Each case is created on its own, not all-or-nothing: a bad body does not stop the others. A unique human caseId (e.g. "GenTC-0012") is assigned to each case, even when other writers create cases at the same time. Returns { success, message, data: { created: [{ id }], failed: [{ index, title, error }] } }; success is true only when nothing failed. Fix and resend only the failed bodies (index points into bodies). Next, run the cases with testrun.create.
Ask your agent
You don’t call case.create_batch yourself. Say something like this to Claude Code, Cursor or another MCP-connected agent:
- “Write test cases for every acceptance criterion of the checkout feature”
- “Save these exploration drafts as test cases under the login feature”
- “Create tests for the password reset flow: happy path, expired link and wrong email”
Inputs
| Name | Type | Description |
|---|---|---|
suiteIdoptional | string | Optional id of the feature, sub-feature or user story to file every created case under (the id from feature.list, feature.create or userstory.create, e.g. "AAts-…"). Cases are appended after the ones already there. Omit to create unfiled cases. |
bodiesrequired | any[] | The cases to create, 1 to 200. Each body takes the same fields as case.create: title (required), steps (required: an array of strings, or stepPosition [{ "stepText", "position" }]; a body without steps fails with "Missing Steps"), and optional description, preCondition, expectedResult, postCondition, priority (P0-P3), status (ACTIVE/INACTIVE, default ACTIVE), acceptanceCriterionLabel, severity, automationStatus, tagData [{ "tagId", "id" }]. Leave caseId out; it is assigned. Example: [{ "title": "AC1: guest checkout succeeds", "acceptanceCriterionLabel": "AC1", "priority": "P0", "steps": ["Open /cart", "Click Checkout", "Choose Continue as guest", "Pay with test card 4242 4242 4242 4242"], "expectedResult": "Order confirmation page shows an order number" }]. |
The MCP call
What the agent’s MCP client sends (placeholders in angle brackets):
{
"jsonrpc": "2.0",
"id": 1,
"method": "tools/call",
"params": {
"name": "case.create_batch",
"arguments": {
"bodies": []
}
}
}Connect your agent
npx -y @testmaze/mcp init tmt_xxx claude mcp add tm --scope project -- npx -y @testmaze/mcp
Create the token in your Test Maze workspace under Settings → MCP. Setup for Cursor, Cline, Gemini CLI and Codex CLI is shown there too.
More test cases tools
- List test cases
case.list - Get one test case
testcase.get - Create a test case
case.create - Update a test case
case.update - Waive an acceptance criterion
case.waive_ac - Delete a test case
case.delete - Delete several test cases
case.delete_batch - Remove a waiver
case.unwaive_ac