Test Case
The Test Case type belongs to the Evaluation Layer — it defines how a thing is measured.
Schema
Section titled “Schema”| Field | Type | Required | Description |
|---|---|---|---|
input | json | ✅ yes | Test input data |
expectedOutput | json | no | Expected output for comparison |
assertions | json | no | Assertion rules (custom format) |
timeout | number | no | Timeout in milliseconds |
Metadata
Section titled “Metadata”| Property | Value |
|---|---|
| Slug | test-case |
| ID | builtin-test-case |
| Icon | 🧪 |
| System | Yes |
| Layer | Evaluation |
Example
Section titled “Example”{ "title": "Content Quality Check", "minionTypeId": "builtin-test-case", "fields": { "input": { "topic": "AI agents", "audience": "developers" }, "expectedOutput": null, "assertions": { "minWordCount": 600, "containsHeadings": true }, "timeout": 30000 }}import { TypeRegistry, createMinion } from 'minions-sdk';
const registry = new TypeRegistry();const type = registry.getBySlug('test-case')!;
const { minion, validation } = createMinion({ title: 'Quality Check', fields: { input: { topic: 'AI' }, assertions: { minWords: 100 } },}, type);from minions import TypeRegistry, create_minion
registry = TypeRegistry()type_ = registry.get_by_slug("test-case")
minion, validation = create_minion( {"title": "Quality Check", "fields": {"input": {"topic": "AI"}, "assertions": {"minWords": 100}}}, type_,)