Our test case covered exactly one possible greeting a user can send - hi - nothing else. Now let’s extend this test case with other possible greetings a real user might send to your chatbot like hello and good morning.
In Botium, these synonyms are called utterance lists. Navigate back to your First Steps Test Set. Instead of using the main menu you can also use the Recently Visited list in the user menu.
-
Open the Test Cases section and click the Write New Utterance List button
-
Enter UTT_USER_HELLO as utterance list name
-
Enter the utterances hi, hello and good morning (use the + button to add an additional input field)
-
Click the Save button to save the utterance list
Now that our utterance list is ready we have to change the First Steps Test Case to send all three greetings to the chatbot instead of only the one we used in our live chat session before.
-
Click on the bubble with text hi in the First Steps Test Case to bring up the conversation step editor
-
Click on the Select From Utterance List button to bring up the selection box for the utterances lists
-
Click on UTT_USER_HELLO to use this utterance list as input for the test case
-
Close the conversation step editor
-
Note that the test case now has been changed: where before there was only the hi as input, now there is the UTT_USER_HELLO utterance list we created before
-
Save the test case and let’s run another test session the same way as above
-
Go to the Test Results menu and in the Start Test Session section, select our First Steps Chatbot and our First Steps Test Set, and click on Start Test Session.
-
-
See what happened now ? There are now 3 test cases, and 2 of them failed!
-
Click on Test Cases and expand one of the two failing test cases
-
You can see here the reason the test case failed:
-
We are sending the text hello to the chatbot (one of the possible greetings in our UTT_USER_HELLO utterance list)
-
The chatbot, as it echoes everything we tell him, is responding with You said: hello
-
But in our test case, we are expecting the response You said: hi from our initial live chat conversation with the chatbot
-
So two of those three test cases are failing
-
-
Let’s fix this test case failure by navigating back to the First Step Test Set, selecting the First Step Test Case and clicking on the You said: hi conversation step
-
Replace the text You said: hi with You said: *
-
Close the conversation step editor and save the test case
-
Run again the test session and you will see that now all three test cases are passing successfully
You noticed that it requires some clicks to start a test session, event with the same chatbot and test set. So before you actually start writing more test cases, let’s create a new test project to make this easier.
Comments
0 comments
Please sign in to leave a comment.