API Test Data & Negative Scenario Generator
Generate realistic valid, invalid, boundary and edge-case API payloads instantly in your browser. Supports JSON Schema, OpenAPI, and raw JSON.
What is this tool?
The API Test Data & Negative Scenario Generator is a client-side tool that automatically creates test payloads for API validation testing. Given a JSON Schema, OpenAPI document, or raw JSON payload, it generates a comprehensive set of positive, boundary, and negative test scenarios.
How does it work?
- Input Detection β Paste your schema or payload. The tool auto-detects whether it is a JSON Schema, OpenAPI document, or raw JSON.
- Schema Analysis β The engine traverses the schema tree, identifying all applicable constraints (required fields, types, patterns, min/max, enums, etc.).
- Scenario Generation β For each applicable constraint, the generator creates deterministic test scenarios by mutating exactly one field at a time.
- Export β Filter and export scenarios as formatted JSON or CSV for use in your testing workflow.
How to use it
- Paste a JSON Schema, OpenAPI document, or raw JSON payload into the input area.
- Click Generate Scenarios (or press Ctrl/Cmd + Enter).
- Browse the generated scenarios. Click any card to expand and view the reason, tags, and full payload.
- Use the filter bar to show only Negative, Boundary, Edge, or Valid scenarios.
- Export via Copy All JSON, Download JSON, or Download CSV.
Limitations
- YAML input is not supported; use JSON-formatted OpenAPI documents.
- Single-field mutations only; multi-field combination scenarios are not generated in the MVP.
- OpenAPI parsing picks the first POST/PUT/PATCH operationβs
application/jsonrequest body. - External
$refdocuments are not fetched; only local$refpointers are resolved. - Maximum input size is 512 KB; maximum output is 200 scenarios per run.
Key Capabilities
- β Auto-detects JSON Schema (Draft 2020-12), OpenAPI 3.x, and raw JSON payloads
- β Generates 11 scenario families: missing required, wrong type, null fields, string length, pattern/format, number boundaries, integer type, multipleOf, array bounds, object properties, and invalid enum
- β Deterministic generation with seeded counter β same input always produces the same scenarios
- β Single-field mutation strategy for precise, isolated negative test cases
- β Export to formatted JSON or CSV with proper escaping and safe filenames
- β Filter scenarios by type: Negative, Boundary, Edge, and Valid
- β 100% client-side processing β your API schemas never leave your browser
Frequently Asked Questions
What input formats does the generator support?
The generator supports JSON Schema (Draft 2020-12 and compatible drafts), OpenAPI 3.x documents with JSON request bodies, and raw JSON payloads. YAML is not supported in the MVP.
Is my API schema data uploaded to a server?
No. All parsing, analysis, scenario generation, and export happen entirely within your local browser. No data is transmitted over any network.
Can I generate multi-field combination scenarios?
The MVP uses a single-field mutation strategy, generating one mutation per scenario for precise, isolated test cases. Multi-field combinations may be added in a future version.
What types of negative scenarios are generated?
The generator produces 11 rule types: missing required fields, wrong type substitutions, null for non-nullable fields, string length boundary violations, pattern/format violations, number boundary violations, integer type violations, multipleOf violations, array bound violations, object property violations, and invalid enum values.
Can I use the generated data with Postman?
Yes. Export the scenarios as JSON and import the payload from each scenario into Postman, Insomnia, or any HTTP client for API testing.
How deterministic is the generation?
Fully deterministic. The same input always produces the same scenarios in the same order. No random values are used in default generation.