AI & Automation / 2 min read

Using static test cases to diagnose and fix chatbot flows without live data

Using static test cases to diagnose and fix chatbot flows without live data improves efficiency and reliability for service businesses.

A woman's profile with a digital brain network, symbolizing the use of static test cases in chatbot development.

The short version

Static test cases offer a solution by simulating user interactions and saving conversations as test cases. Creating a test case involves clicking the Create test case button, providing a display name, and saving it.

How can static test cases help identify chatbot flow issues?

A chatbot flow can use static agent data or dynamic webhook services to create responses for end-users. Saving a test case saves the intent matches, playbook actions, activated flows, and activated pages as test case expectations. The Event Debugger provides information on how your bot understood the user’s message and why it made specific decisions. It also displays the complete event payload, including NLU metadata, state, and raw responses. For example, if a user asks for a service, the test case shows whether the bot correctly identifies the intent and activates the appropriate flow.

How does saving a test case help in debugging chatbot flows?

By using logs, you can see what happened step-by-step before an error occurred. This can help you understand what went wrong and how to fix it. Handlers applied to the flow start page are in scope and can affect the session. Handlers are only in scope if they have an intent requirement when the current page is not the flow start page.

What are the key considerations when creating a test case?

When creating a test case, start with the specific interaction you want to validate. Use the simulator to simulate user input and observe the chatbot’s response. For example, if a user asks, "What are your hours?" you might expect the chatbot to respond with "We’re open Monday through Friday, 9 AM to 5 PM." Validate this by setting the expectation in the test case. This creates a snapshot of the chatbot’s state, making it easier to compare against expected outcomes.

What to do next

Create a test case for the most critical interaction. Use the simulator to replay the scenario and save the response. Review the saved test case to identify discrepancies in playbook actions or page activations. Adjust the flow based on findings and retest.

Need help implementing something like this? I work with businesses and agencies on websites, AI systems and automation. Work with me

Sources