Overview
Assertions are the final step in your test pipeline. After all blocks execute, assertions check if the data in the DataBus matches your expectations.Simple Assertions (Equality)
The simplest form checks for exact equality:- String values must match exactly
- Numbers must match exactly
- Booleans must match exactly
- Null values must match exactly
Operator Assertions
For more complex validation, use operator objects with 20+ powerful operators.Equality Operators
Numeric Comparisons
gt: Greater thangte: Greater than or equallt: Less thanlte: Less than or equal
String/Array Operations
Pattern Matching
Type Checks
Boolean Checks
Empty Checks
Complete Example
Multiple Operators
You can combine multiple operators on the same field - all must pass:user.age: Must be between 18 and 100response.message: Must contain “success” AND start with capital letteruser.email: Must be valid email format AND not empty AND at least 5 characters
Common Patterns
- HTTP Status
- AI Judge
- Data Validation
- Tool Validation
Assertion Failures
When an assertion fails, you get detailed error messages:Best Practices
Test Both Success and Failure Cases
Test Both Success and Failure Cases
Test successful response:Test error handling:
Use Ranges Instead of Exact Values
Use Ranges Instead of Exact Values
Bad - too specific:Good - allows for variance:
Validate Structure and Content
Validate Structure and Content
Don't Over-Assert
Don't Over-Assert
Bad - too many assertions make tests fragile:Good - test what matters:If any specific detail changes, overly specific tests will break unnecessarily.
Operator Reference
Equality Operators
Numeric Operators
String/Array Operators
Pattern Operators
Type Operators
Boolean Operators
Empty Operators
Next Steps
Browse Blocks
See what data each block produces
View Examples
See assertions in real tests

