Creating Test Cases
Esta página aún no está disponible en tu idioma.
The Test Architect is Mibo’s AI assistant for creating tests. Instead of writing test cases manually, you describe what your AI system should do in plain language, and the AI generates the test scenarios for you. Mibo then evaluates the traces your Agent sends against these tests.
Opening the Test Architect
Section titled “Opening the Test Architect”Open Tests and click New test. Choose the Agent this test checks under Which agent should this test check? If your workspace has one Agent, the editor opens for it directly. The editor opens with the Test Architect chat on one side and the Draft on the other.
You can also start from an Agent’s page. Select Create tests next to No test covered to open the same editor for that Agent.
Start from a real trace
Section titled “Start from a real trace”A real trace records an execution of your Agent, including its input, output, and execution steps. Use one to ground generated tests in behavior your Agent has actually produced.
- In the Test Architect chat, click Attach a trace. You can also use the Start from a real trace link, or the Attach a trace action in the composer’s Attach context menu.
- In Ground generation on a real trace, select a completed trace for this Agent, review its preview, and click Use this trace.
- The chat shows a trace card with facts Mibo reads from the trace without AI: Tools called, in order, Nodes, and Final reply. The Test Architect uses the trace’s real node names and argument keys instead of guessing them.
You can attach up to two traces to one message. Remove an attached trace from the chat before you attach another.
If the dialog says there are no completed traces for this Agent yet, send a trace first. See Sending Traces.
Creating tests through conversation
Section titled “Creating tests through conversation”Start by telling the AI about your system. For example:
“My agent helps users book restaurant reservations. It should ask for the date, time, and party size before confirming the booking.”
The AI will generate a set of test cases based on your description. You can keep the conversation going to refine or add more:
“Also test what happens when the user asks for a date that’s already fully booked.”
“Add a test for when the user doesn’t specify a time.”
Each time you describe a scenario, the Test Architect creates or updates the test cases in the Draft.
While the model works, the chat shows Thinking… and the step it is on. Select Show reasoning to read the model’s reasoning as it arrives. Select Hide reasoning to collapse it.
You can also attach JSON files to the conversation, for example an n8n workflow export, a Flowise chatflow config, or a JSON document describing your API. Use the Attach context menu and choose Upload or paste JSON. The AI analyzes the structure to detect testable nodes and suggest test targets. You can also paste JSON directly into the chat instead of uploading a file.
Attach the original workflow export or paste the complete JSON object when you want the Test Architect to identify workflow steps. It accepts a JSON object or a JSON code block. Pasted JSON, including a raw object or fenced JSON code block, must be 100,000 characters or less to be analyzed. Attached JSON files can be up to 500 KB. For large attached exports, Mibo reduces unrelated parameter detail to retain node, step, and module identities and their connections. If the reduced workflow is still over 50,000 characters, Mibo returns a general result without workflow targets. A top-level JSON array or malformed JSON is not analyzed.
The chat removes secrets from what you send before it reaches the AI model. See Data handling.
What a test case contains
Section titled “What a test case contains”Each test case has these parts:
- Name: a short description of what’s being tested.
- Applies to: the Agents the test checks.
- Checks a trace when (optional): the condition that decides which incoming traces this test checks. Leave it empty to check every trace. See Which test cases run on a real conversation.
- Checks: the rule-based and AI-powered checks Mibo runs against each trace the test applies to.
- More options (optional): Category, Success metric, and Context (JSON), the fixed variables that check expressions can read.
Test input
Section titled “Test input”A test does not store an input. Mibo reads the user input recorded in each trace it evaluates. Write Checks a trace when to describe the kind of input the test covers. Mibo compares each trace’s input with that condition.
Assertions
Section titled “Assertions”Tests use two kinds of checks: Does checks are rule-based (deterministic, did the system call the right tool?), and Says checks are AI-powered (scored by an evaluator, is the response good?). The Test Architect generates these automatically based on your descriptions.
Editing a test case by hand
Section titled “Editing a test case by hand”Every test case the AI creates lands in the Draft. You can tweak any field there. To write a test case without the AI, open Tests, click New test, and choose the Agent. Then fill in the form.
The form has three sections.
1. Name, applies to, and condition
Section titled “1. Name, applies to, and condition”| Field | What to put here |
|---|---|
| Name | A short name for the test, such as “Refund request”. |
| Applies to | The Agents the test checks. |
| Checks a trace when | Describe the kind of conversation this test checks, such as “The user asks to cancel their subscription.” Leave it empty to check every trace. An AI classifier decides which traces match. |
2. Checks
Section titled “2. Checks”Add checks with two buttons:
- The Does check dropdown adds a rule-based check. Choose the target from the list: HTTP status, Response time, JSON match, Regex pattern, JSON Schema, Token limit, Workflow step, or Tool call. Each check then shows its own fields. For example: “The
create_bookingtool was called withparty_size: 4.” These checks pass or fail. - For a trace with images or video, the Test Architect can propose a Media check. Choose Media in the Does check dropdown to add one yourself. See Media.
- The Says check button adds an AI-scored check. Write the criterion in plain English, such as “The agent confirms the booking, the date, and the time.” An AI evaluator scores the response from 0 to 1. Set Strictness with the slider from 0 to 1, in steps of 0.05. Higher values require a higher score. A new check starts at 0.8.
For a visual criterion, the Test Architect can turn on Judge output images when the final reply has a PNG or JPEG image. For presence, count, type, or size, it proposes a Media check instead. Image judging is off by default. A judged check uses one AI evaluation, plus one for each image. See Images and video in traces.
The Assertion Reference covers every check type with copy-pasteable examples.
3. More options
Section titled “3. More options”Open More options and use Context (JSON) to set fixed variables, such as USER_ID. Assertion expressions can read them by name. See Context variables.
Use View as JSON to see the saved definition. Edit JSON (advanced) edits it directly. This is not recommended for most users.
Saving your tests
Section titled “Saving your tests”When you’re happy with the tests, click Save test. Mibo saves them. Saved, active tests apply to the next traces your Agent sends.
Managing test cases
Section titled “Managing test cases”Open a test from Tests to manage it:
- Active (switch): turns the test on or off. An inactive test is skipped for new traces.
- Edit: changes the test in the editor.
- Clear runs (under Manage test): removes the test’s past results.
- Delete test (under Manage test): deletes the test. Its Agents and traces stay available.
Use the filters on the Tests list to narrow it down, by Agent, Result, Category, and Window.
Tips for effective tests
Section titled “Tips for effective tests”- Be specific. “Should respond with the store hours for the Manhattan location” is much better than “Should respond correctly.”
- Test one thing per case. Each test should verify a single behavior, not five things at once.
- Include edge cases. What happens with empty inputs? Very long messages? Unexpected formats?
- Ground tests in real traces. Generate tests from completed traces so assertions use your Agent’s real node names and arguments.
- Combine check types. Use a Does check to verify the right function was called, and a Says check to verify the response was well-worded.
- Set appropriate strictness. Use a number from 0 to 1 for AI-powered checks. Higher values require a higher evaluator score.