Features
Testing Flows
Learn how to test your chatbot flows in the Canvas feature during development.
The Testing Flows feature allows you to simulate conversations and interactions with your chatbot while developing it. This helps you identify errors, validate logic, and ensure your flow behaves as expected before deployment.
Why Test Your Flow?
Testing your flow ensures:
- Accuracy: Validate edge conditions, tool integrations, and variables.
- User Experience: Simulate real user interactions to optimize responses.
- Debugging: Identify and fix errors in the flow logic or configurations.
How to Test a Flow
1. Open the Test Mode
- Navigate to the Canvas Workspace.
- Click on the Test Button (commonly located in the top-right corner).
- A chatbot interface will open, allowing you to interact with your flow.
2. Simulate User Interactions
- Enter inputs as if you were a user.
- Observe the chatbot’s responses and the flow progression.
- Test specific scenarios to verify edge conditions, variable usage, and tool integrations.
3. Debugging with the Flow Preview
- While testing, use the Flow Preview to visualize the current node, path, and conditions being executed.
- Identify any nodes or edges that don’t behave as expected.
Key Features in Testing Mode
-
Real-Time Feedback:
- See responses as they are generated.
- Highlight issues in tool calls, conditions, or variable substitutions.
-
Flow Navigation:
- View the active node and how the flow progresses.
- Test rewinds and dynamic routing logic.
-
Adjust and Retry:
- Make quick edits to nodes, tools, or conditions.
- Retest the flow to verify fixes.
Testing Edge Cases
Ensure your flow handles unusual scenarios effectively:
- Invalid Inputs: Test how the chatbot responds to unexpected user inputs.
- Tool Failures: Simulate API or tool errors and verify error handling.
- Unmatched Conditions: Ensure a default path exists for conditions that don’t match.
Example:
- If a user asks an unsupported question, the chatbot should gracefully fall back to a help or default response.
Example Testing Workflow
- Start a test session from the Canvas Workspace.
- Input queries such as:
- “What can you do?”
- “Cancel my subscription.”
- Observe:
- Chatbot responses.
- Node transitions and edge conditions.
- Debug:
- Fix any incorrect responses or misrouted flows.
- Retest until the flow behaves as expected.
Best Practices for Testing Flows
- Test Incrementally: Test small sections of your flow before combining them into a larger flow.
- Simulate Real Scenarios: Use realistic inputs to replicate user behavior.
- Validate All Paths: Ensure every edge and condition has been tested.
- Track Logs: Review error logs or debug information for troubleshooting.
Example: Customer Service Chatbot Testing
- User greets the chatbot → Test the Start Node response.
- User asks about pricing → Validate routing to the Pricing Node.
- User cancels the inquiry → Test the Cancel Node’s response.
- User enters invalid input → Ensure the chatbot redirects to clarification or fallback.
Visual Representation:
A flow diagram showing tested nodes and responses.
Ready to deploy or refine your flow? Learn about Calling Tools to add more functionality to your chatbot!