Creating Scenario Files
Overview
This skill documents how to create test scenario JSON files for Output SDK workflows. Scenarios provide predefined inputs for testing workflows during development and validation.
When to Use This Skill
- Creating test inputs for a new workflow
- Documenting different use cases
- Setting up regression tests
- Debugging workflow behavior with specific inputs
Location Convention
Scenario files are stored INSIDE the workflow folder:
Important: Scenarios are workflow-specific and live inside the workflow folder.
File Naming Convention
Use snake_case for scenario file names:
Examples:
basic_input.jsontest_input_solar_panels.jsonedge_case_empty_content.jsoncomplex_with_references.json
Naming patterns:
basic_*- Minimal valid inputcomplex_*- Full-featured input with all optionsedge_case_*- Boundary conditions and edge caseserror_*- Inputs expected to produce errors
Basic Structure
A scenario file is a JSON file that matches the workflow's inputSchema:
Matching inputSchema
The scenario JSON must match the Zod schema defined in types.ts:
Example Schema (types.ts)
Corresponding Scenarios
basic_input.json (minimal required fields)
complete_input.json (all fields specified)
Real-World Example
Based on image_infographic_nano workflow:
test_input_solar_panels.json
test_input_complex.json
Running Scenarios
Using CLI
Example Commands
Related Skill: output-workflow-run for detailed CLI usage
Scenario Categories
1. Basic/Happy Path
Minimal valid input to verify the workflow works:
2. Complete/Full-Featured
All optional fields populated:
3. Edge Cases
Test boundary conditions:
edge_case_min_values.json
edge_case_max_values.json
4. Error Cases (for validation testing)
error_missing_required.json
Note: Error scenarios won't pass validation but are useful for testing error handling.
Best Practices
1. Document the Purpose
Add a comment field (if supported) or create a companion README:
2. Use Realistic Data
Not:
3. Cover All Enum Values
If schema has enums, create scenarios for each:
4. Include Optional Field Variations
5. Create Regression Test Scenarios
Save inputs from bug reports:
Scenario Organization
For workflows with many scenarios, organize into subfolders:
Verification Checklist
- Scenario file located in
scenarios/folder inside workflow directory - File uses
.jsonextension - File name uses
snake_case - JSON is valid and parseable
- All required fields from inputSchema are present
- Field types match schema (strings, numbers, arrays, etc.)
- Enum values are valid options from schema
- Numbers are within min/max constraints
- At least one basic scenario exists
- Workflow runs successfully with the scenario
Testing Scenarios
Validate JSON Syntax
Run and Verify
Related Skills
output-dev-types-file- Defining inputSchema that scenarios must matchoutput-dev-folder-structure- Understanding scenarios folder locationoutput-workflow-run- Running workflows with scenario filesoutput-workflow-list- Finding available workflows


