Overview
The MockData block returns static data defined in its configuration. Perfect for testing pipelines without making real HTTP requests or for providing test fixtures.Input Parameters
None. MockData doesn’t take any inputs.Configuration
Parameter | Type | Description |
---|---|---|
data | object | The data to return (can be any structure) |
Output Fields
The block returns whatever fields are defined inconfig.data
.
Examples
Basic Mock Data
Mock User Object
Mock API Response
Mock Array Data
Common Patterns
Testing Validation Logic
Testing LLM Judge
Mock Multiple Blocks
Progressive Enhancement
Start with mock data, then replace with real requests:Full Example
Tips
Use for Unit Testing
Use for Unit Testing
Mock data is perfect for testing validation logic without external dependencies:
Mimic Real API Structure
Mimic Real API Structure
Structure mock data to match real API responses:
Test Edge Cases
Test Edge Cases
Create mocks for edge cases and error scenarios:
Combine with Real Blocks
Combine with Real Blocks
Mix mock and real blocks to test specific parts of your pipeline:
When to Use
Use MockData when:- Testing validation logic without external APIs
- Creating reproducible test fixtures
- Developing tests before APIs are available
- Testing edge cases and error scenarios
- Running tests without network access
- Testing actual API integration (use HttpRequest)
- Verifying real system behavior
- Load testing or performance testing