What are Blocks?
Blocks are the building pieces of test pipelines. Each block does one thing well and can be combined with other blocks to create complex test scenarios.Available Blocks
HttpRequest
Make HTTP requests to APIs with full control over method, headers, and body
JsonParser
Parse JSON strings into structured data
StreamParser
Parse streaming SSE responses from OpenAI, Vercel AI SDK, and custom formats
ValidateContent
Validate text content with contains, regex, length checks, and more
ValidateTools
Validate AI tool calls, order, arguments, and constraints
LLMJudge
Use AI to evaluate responses semantically with configurable criteria
Loop
Loop back to previous blocks with max iteration control
MockData
Return mock data for testing without external dependencies
Block Categories
HTTP & Data Fetching
- HttpRequest: Make API calls
- MockData: Test without external dependencies
Parsing & Transformation
- JsonParser: Parse JSON responses
- StreamParser: Handle streaming data
Validation
- ValidateContent: Text and content validation
- ValidateTools: AI tool call validation
- LLMJudge: Semantic validation with AI
Control Flow
- Loop: Retry logic and iterations
Common Patterns
API Testing
AI Agent Testing
Retry Logic
Creating Custom Blocks
Don’t see what you need? Create custom blocks:Learn More About Custom Blocks
Complete guide to creating and registering custom blocks
Block Composition
Blocks are designed to be composable. Here are common combinations:Full API Test
Full API Test
AI Response Validation
AI Response Validation
Retry with Validation
Retry with Validation
Mock Testing
Mock Testing
Next Steps
Explore Each Block
Click on any block above to see detailed documentation
View Examples
See blocks in action with real examples
Create Custom Blocks
Extend SemanticTest with your own blocks