Skip to main content

Overview

SemanticTest supports three different input formats for passing data to blocks. This flexibility lets you write cleaner, more readable tests.

1. String Format (Simple)

Pass a single value from the DataBus:
What happens:
  • The value from response.body is wrapped in an object
  • Becomes: { body: "the actual value" }
  • The block receives it as inputs.body
When to use:
  • Single value input
  • Quick and simple syntax
  • Most common format

2. From/As Format (Mapping)

Map a DataBus slot to a specific parameter name:
What happens:
  • Value from parsed.message is mapped to parameter text
  • The block receives it as inputs.text
When to use:
  • Block expects a specific parameter name
  • You need to rename the data
  • More explicit about what data goes where
Example:

3. Object Format (Full Control)

Pass multiple values with deep variable resolution:
What happens:
  • All ${} variables are resolved from the DataBus
  • The entire object is passed to the block
  • Nested objects are fully resolved
When to use:
  • Multiple parameters needed
  • Complex nested data structures
  • Mix of static and dynamic values

Comparison

Variable Resolution

All formats support ${} syntax for reading from the DataBus:

Best Practices

Common Patterns

API Requests with Auth

Validation with Specific Field

Tool Validation

Next Steps

Output Formats

Learn how blocks output data

Data Flow

Understand the DataBus