Our first 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 History list in the user menu.
-
From the Test Cases tab, click the + NEW button and select
Utterances from the options.
-
Enter UTT_USER_HELLO as the utterance list filename
-
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
-
Update the First Steps Test Case by clicking on the bubble with the text
hi shown in the first 'User' step to bring up the conversation step editor. Here
we will now send all three greetings to the chatbot instead of only the one we used in our
live chat session before.
-
Change the Type from Text to Utterance, then use the 'Select Utterance'
dropdown menu to select UTT_USER_HELLO as the utterance list for the user
step.
-
Click the APPLY CHANGES button to close the conversation step editor.
Note: 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
-
Click the SAVE button to save the test case.
-
Navigate back to My First Project and let’s repeat the test session to see what
differences this change has made.
Remember: Remember, instead of using the main menu you can also use the
History list in the user menu to jump back to the test project.
-
Click the REPEAT TEST SESSION button found in the upper right of the
screen
Result: Now we see that there are 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 it, is responding with You said:
hellobut in our test case, we are expecting the response You said: hi
from our initial live chat conversation with the chatbot.
- For this reason two of those three test cases are failing.
-
Let’s fix this test case failure by navigating back to the First Step Test Set,
but this time we will update the 'Bot' step by clicking on the bubble with the text You
said: hi.
-
Replace the text You said: hi with You said: *
-
Click the APPLY CHANGES button to close the conversation step editor.
-
Navigate back to My First Project and let’s repeat the test session one more
time to see if the issue has now been resolved.
Result: Success! The test is now passing without fail.