Test Cases Overview
Test Cases consist of a sequence of Test Steps that capture the conversational flow. Each Test Step is a combination of Step Number, Test Input, Expected Output, Actual Output, and Test Result. Step# defines the sequence of execution. Test Input represents the user message part of the conversation. Expected Output represents the bot message that is anticipated from the assistant. Actual Output represents the response of the assistant during test execution. The platform will evaluate the Actual Output against the Expected Output to determine if a test step is passed or not. Test Result indicates if the actual output is the same as the expected output. Test Result can be Pass, Failed, or Not Executed.
Test Case Creation
New Test Cases can be created by recording the conversation while using ‘Talk to Bot’. Follow the following steps to create a new test case. Step 1: Launch ‘Talk to Bot’ by clicking on the icon in the bottom right corner of your screen. ‘Talk to Bot’ can be launched from any module on the platform.
Step 2: Click on ‘Record Conversation’ to start recording the messages that are going to be part of the test case.
Step 3: Interact with the assistant by entering relevant user messages. Step 4: To create a new test case, click on ‘Stop Recording’ and then click on ‘Create Test Case’.
Step 5: In the next screen, add the necessary details such as ‘Test Case Name’, ‘Description’ and ‘Tags’ and click on ‘Add’.
Step 6: Navigate to the Conversation Testing module to execute the added test case or add another test case by following the same steps.
Tags
Tags help in classifying and organizing test cases. You can choose to add a tag at the time of the creation of a test case or from under Test Case Properties > General Settings.
General Settings
After a test case is created, you can access the ‘General Settings’ from the Test Case Options menu.
Within the General Settings, you have the option to edit the following properties.
- Test Case Name
- Test Case Description
- Test Case Tags
Additionally, the following properties can be viewed but not edited.
- Date & Time of Test Case Creation
- Name of the User who created the Test Case
- Date & Time of the last update
- Name of the user who last updated the test case
Test Case Execution
The following steps will guide you on how to execute a test case and obtain a detailed analytical report based on the execution.
- Step 1: Select the Test Cases that you would like to execute.
- Step 2: Click on ‘Run Test Case’ to start the execution.
- Step 3: Next, you are required to choose the Version of the assistant that you want to test. Based on the version selected, please ensure that you have valid authorization tokens for the assistant to make the service calls that would be part of the test case.
- Step 4: You can monitor the progress of the execution from the last result column against the test case and the status docker.
- Step 5: Once the test case execution is over, you can click on the test case to view the execution history.
- Step 6: Click on any of the listed test runs to view the details of the test run. Test Cases are executed asynchronously i.e. even when multiple test cases are selected, the execution happens sequentially. You have the option to cancel the test execution before the execution is completed. Once the test case execution has started, the platform continues to execute the test case even when one or more test steps fail. However, if the test execution is stuck at a test step for more than 60s the platform will timeout and abort the execution.
Interpreting Test Results
The following details are stored against every test execution.
- Date & Time of Execution completion.
- Version Type to indicate if the test case was run against the In-development or the Published version of the assistant.
- Execution Result to indicate the result of the execution. A test case is treated as failed if at least one of the test steps is failed.
- Execution Time indicates the total time duration of the execution.
- Test Step Details represent the total steps that were passed, failed, or not executed.
- Execution Error Details are shown only when the platform is unable to complete the test execution either because of the user aborting the test case or the test step timing out due to an error.
Limitations
The following modules cannot be tested with the current version of conversation testing.
- Digital Forms
- Dynamically generated messages where content or context variables are used.
The Test Runner Tool
If you would like to set up your own test execution application, then you can download the libraries provided at the Kore.ai Github repository. You can record and download the test cases from the platform, and run these test cases on your application. Note that this tool is an open-source code that you can fork a branch and make changes as per your requirements.
Important Notes:
|
The Testing Tool will converse with the assistantusing the user input from the JSON file and compare the bot response with the recorded bot responses. The results are recorded in a Test Results spreadsheet providing a comprehensive report of the test run, with the developer input, actual and expected results, and the status of the test run (passed or failed). You can use this spreadsheet to report, keep a track of, and re-test the failed test cases. For more details on the Test Runner refer to the Kore.ai Github.