Testing the chatbot responses by using test cases
As an administrator, create and run test cases to check whether the chatbot application responds to the user queries correctly. By defining a partial expected response, validate whether the chatbot application checks it against the intent and the configured response, ensuring data accuracy.
Before you begin
- Make sure you have created intents, entities, and dialogs.
- If you are using a localized Chatbot Skill, make sure your test data locale matches the workspace locale.
- Make sure you have created and mapped the Web API connection for Telemetry.
To create test cases
- Log in to BMC Helix Innovation Studio and select the BMC Chatbot application.
- On the Records tab, select Chatbot Message Monitoring Test Case, and click Edit data.
- Click New to create a new record.
- In the New Record pane, enter the following details:
- From the CHATBOT CONFIGURATION_ID list, select the chatbot configuration.
- In the Description field, enter a description for the record.
- In the Name field, enter a unique name for the record.
- In the Run interval – hours field, select the interval at which this process must run.
- In the User query field, type a text string the user might ask the chatbot.
- In the Partial expected response field, type the text you expect to get as a response.
Important: The value you enter in the Partial expected response field is case-sensitive.
The values for the Created By, Last run, and Status fields are automatically updated.
- Click Save.
To run the test cases
- Log in to BMC Helix Innovation Studio and select the BMC Chatbot application.
- On the Processes tab, click Manage processes.
- From the list of processes, select one of the following processes:
- Chatbot Message Action—To check whether the messages to the chatbot are working correctly.
Specify the chatbot ID, chat ID, and the input text. - Chatbot Message Monitoring Check All—To run all the test cases in a record definition.
- Chatbot Message Monitoring Single Check—To run a single test case in a record definition.
Specify the use case ID and the record definition name.
- Chatbot Message Action—To check whether the messages to the chatbot are working correctly.
- Click Run.
After the process is run, the status of the test case is displayed on the Chatbot Message Monitoring Test Case list page.
The Chatbot Message Monitoring Log record definition captures the error log information.
To resolve failed test cases
- Open a record in the Chatbot Message Monitoring Log record definition to view the error details.
- Review the Log short text information.
- If necessary, make changes to the intent or the test case, and rerun the test case to validate the responses.
Tip: For faster searching, add an asterisk to the end of your partial query. Example: cert*