Test Fixture Generator
Create realistic test fixtures from DB schemas, API responses, and TypeScript types. Faker-powered data generation for comprehensive testing.
Get the CLI Tool
Generate test fixtures locally as an MCP server, or try it online below.
npx @clinetools/fixture-gen- Generates realistic data from TypeScript interfaces and DB schemas
- Faker-powered: names, emails, dates, addresses, UUIDs, and more
- Consistent cross-references between related fixtures
- Supports JSON, TypeScript, SQL INSERT, and factory patterns
- Preference conversation on first run — locale, format, seed options
How to Use It
Three ways to generate test fixtures — pick the one that fits your workflow.
Try Online
Paste a TypeScript interface below to generate fixtures — no install needed.
Use via CLI
Run as a local MCP server. On first run it asks about your data preferences.
Add to Cline / Claude Code
Add to your MCP settings so your agent generates fixtures automatically.
MCP Client Configuration
{
"mcpServers": {
"fixture-gen": {
"command": "npx",
"args": ["@clinetools/fixture-gen"]
}
}
}Example: Generate from Schema
// Prompt to your AI agent:
"Generate 10 realistic user fixtures
matching our User type"
// The agent calls:
generate_fixtures({
type_file: "src/types/user.ts",
interface_name: "User",
count: 10,
format: "json"
})
// Output: 10 user objects with realistic
// names, emails, dates, consistent IDsTry It Online
Paste a TypeScript interface and generate realistic test data.
Paste TypeScript Interface
We analyze field names and types to generate realistic faker data
Paste a TypeScript interface and click Generate Fixtures to create test data.
Generated Fixtures (JSON)
Why Test Fixtures Matter
Good test data is the foundation of reliable tests. Bad fixtures lead to false positives and missed bugs.
Realistic Data
Tests with "test123" and "foo@bar.com" miss real-world edge cases. Faker-generated data includes unicode names, long emails, varied date formats, and realistic values that expose bugs.
Consistent Relations
When your User fixture has id "abc-123", the Order fixture should reference the same user_id. Generated fixtures maintain referential integrity across related entities.
Reproducible
Seeded generation means the same fixtures every run. No flaky tests from random data. Change the seed for different scenarios, but keep it deterministic within a test suite.
Schema-Driven
When your types change, fixture generation adapts automatically. Add a field to your interface, re-run the generator, and all fixtures include the new field with appropriate values.
Generate Test Data That Catches Bugs
Add the Fixture Generator to your agent's toolkit and never hardcode test data again.
View Plans