Beta. API simulation wrappers are a beta feature and may change.
Configure an API call
1
Open a test set
Open Test Sets, then select the test set you want to configure.
2
Select the API wrapper
In Simulation setup, select API and click Add Pre-Simulation API Call.
3
Configure the request
Enter the endpoint URL, HTTP method, timeout, and any optional JSON request body or headers.
4
Reference the response
Add
{{sim_wrapper.api.*}} variables to your test case inputs using the response examples below.5
Save the test set
Save to apply the configuration to every test case in the test set.
Request settings
Use an object response
For a JSON object response, fields are available directly undersim_wrapper.api.
For example, if the endpoint returns:
Use an array response
For a JSON array response, the complete array is available undersim_wrapper.api.response. Use bracket notation to select an item.
For example, if the endpoint returns:
phoneNumber and phone_number are different properties.
Troubleshooting
- Confirm the endpoint is publicly reachable from Coval and returns a successful HTTP status.
- Confirm the response body is valid JSON.
- Check that every property name and array index in the template matches the response.
- Increase the timeout if the endpoint regularly needs more than 30 seconds.
- Test the endpoint with non-sensitive sample data before running the full test set.