Introduction
After configuring a custom tool and its authentication, thorough testing is crucial before assigning it to a live voice agent. Testing ensures the tool connects correctly to the external API, handles inputs properly, and returns the expected output. AlloMia provides a dedicated testing interface for this purpose. This guide explains how to use it effectively.Accessing the Testing Interface
When viewing or editing a custom tool, navigate to the ‘Testing’ tab in the tool configuration interface.Running a Tool Test
The testing interface automatically uses all the configuration settings you’ve already provided for the tool (URL, method, headers, body, authentication). To test your tool:- Review your tool configuration to ensure it’s complete.
- Click the ‘Test Tool’ button in the testing tab.
- The system will validate your tool configuration before sending the request. If any configuration errors are detected, you’ll receive validation warnings.
Viewing Test Results
After running a test, results are displayed in a tabbed interface with two main views:1. Response View:
The default view showing information about the API response:- Status Code & Badge: Shows the HTTP status code (e.g.,
200 OK,401 Unauthorized) with a colored badge indicating success or failure. - Response Size: The size of the returned data.
- Response Data: The actual content returned by the API, typically formatted as JSON.
- Response Headers: HTTP headers returned by the API.
2. Request View:
Click the ‘Request’ tab to see details about what was sent to the API:- Request URL: The full URL that was called, including any path parameters.
- Request Method: The HTTP method used (GET, POST, etc.).
- Request Headers: All headers sent with the request, including any authentication headers.
- Request Body: For POST/PUT requests, the data payload that was sent.
Interpreting Test Results
The testing interface will display the outcome of the test run, with clear visual indicators:- Success (Green): Status codes in the 200-299 range indicate the request was successful. The response body should contain the data you expected.
- Client Error (Red): Status codes in the 400-499 range indicate a client-side error (e.g.,
401 Unauthorizedfor authentication issues,404 Not Foundif the resource doesn’t exist). - Server Error (Red): Status codes in the 500-599 range indicate a server-side error in the external API.
Troubleshooting Common Issues
If the test fails, examine the results carefully:- Authentication Errors (e.g., 401, 403): Double-check your authentication configuration in the Authentication tab. Verify the API key, token, or credentials are correct and properly formatted.
- Not Found Errors (404): Verify the API endpoint URL is correct. Check if variables in the URL path are being populated correctly.
- Bad Request Errors (400): Review the request body structure. Ensure it matches the external API’s requirements and that the Content-Type header is set correctly, typically to ‘application/json’.
- Server Errors (5xx): The external API might be experiencing issues. Check its status or try again later.
- Validation Errors: If you see validation warnings before the test runs, fix those configuration issues first.
Next Steps
Once your tool passes testing reliably with the expected response data, it’s ready to be connected to your voice agents. Proceed to the ‘Connecting Tools to Voice Agents’ guide to learn how to make your tested tools available to your agents.- Real-World Simulation: Test in conditions that mirror actual usage
- Compliance First: Prioritize testing security and regulatory requirements
- Collaborative Approach: Involve both technical and clinical stakeholders
- Continuous Improvement: Use test results to refine tool functionality