Botium in a Nutshell, Part 2: Writing Chatbot Tests

Hello, World!

  1. submitting a phrase possibly entered by a real user to the chatbot
  2. checking the response of the chatbot with the expected outcome
#me
hello bot!
#bot
Hello, meat bag! How can I help you ?
  • plain text file with Notepad or any other text editor
  • Excel file
  • CSV file (comma separated values)
  • and more …

Convos and Utterances

#me
hi bot!
#bot
Hello, meat bag! How can I help you ?
#me
hey dude
#bot
Hello, meat bag! How can I help you ?
TC01 - Greeting#me
HELLO_UTT
#bot
Hello, meat bag! How can I help you ?
HELLO_UTT
hello bot!
hi bot!
hey dude
good evening
hey are you here
anyone at home ?

Botium will take care that the convo and utterances files are combined to verify every response of your chatbot to every greeting phrase.

#me
HELLO_UTT
#bot
Good morning, meat bag! How can I help you this early ?
#me
HELLO_UTT
#bot
Good evening, meat bag! How can I help you at this late hour ?
BOT_GREETING_UTT
Good evening
Good morning
Hello
Hi
#me
HELLO_UTT
#bot
BOT_GREETING_UTT
  • An utterance referenced in a #me-section means: Botium, send every single phrase to the chatbot and check the response
  • An utterance referenced in a #bot-section means: Botium, my chatbot may use any of these answers, all of them are fine

Where to place BotiumScript files ?

Using Excel Instead of Text Files

First Excel sample
Second Excel sample
Using utterances in Excel (Convo)
Using utterances in Excel (Utterances)
  • The sheet names where to look for convos
  • The sheet names where to look for utterances
  • The row and column index where to start looking

And More BotiumScript Features

Scripting Memory

#me
please send me two salami pizza
#bot
OK. Your order number is $orderNum
#me
What is the status order $orderNum
#bot
Your order will arrive soon

User Interface Elements

#me
please send me two salami pizza
#bot
Please select the size of the pizza
BUTTONS Kids|Normal|Family
MEDIA kids_pizza.png|normal_pizza.png|family_pizza.png
#bot
What Pizza do you want ? Please choose an option.
#me
BUTTON Salami
#bot
Did you like your Pizza ?
#me
No. It was ugly.
MEDIA pizza_ugly.png

Splitting Convos

PARTIAL_LOGIN#bot
Please tell me your customer access code!
#me
1234567
#bot
Thanks, you are logged in now.
SHOW_INFO#me
Show my registration info.
INCLUDE PARTIAL_LOGIN#bot
OK, here is your registration info:

Frequently Asked Questions

  • A Capture&Replay tool to capture a conversation with your chatbot and generate a convo file out of it
  • Several importers for generating convo files out of chatbot development tools (such as Dialogflow and IBM Watson Assistant)
  • If you have existing conversation logs, they usually can be converted to convo files with reasonable effort
  • The Botium Platform includes hundred thousand of prebuilt test cases for different domains
  • fixed matching
  • lowercase matching
  • substring matching
  • regular expression matching
  • or you can even implement your own logic and hook it into Botium

--

--

--

Co-Founder and CTO Botium🤓 — Guitarist 🎸 — 3xFather 🐣

Love podcasts or audiobooks? Learn on the go with our new app.

Recommended from Medium

Free web development resources for coding with phone

Acode app, A web development app for coding with phone

GitHub, Slow Down there Partner!

6 Hacks to Speed up Mobile App Development

Scrum Toolkit: Agile Estimation Technique by Compare

Distributed Agile, my experiences

Why Safety Culture Is a Heart of the Software Engineering Model?

Safety Culture- Devops

Ledger TurboTax Integration | Everything You Need To Know (And Instructions For International…

Ledger TurboTax Integration | Everything You Need To Know (And Instructions For International Users)

Flutter flip coin animation test-drive

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store
Florian Treml

Florian Treml

Co-Founder and CTO Botium🤓 — Guitarist 🎸 — 3xFather 🐣

More from Medium

Check yourself before you publish new Page Object

Understanding Black Box Testing — Types, Techniques, and Examples

Automation Testing Tutorial: A Starter’s Guide With Example

Relative Locators in Selenium 4 : Yet another way to handle dynamic Web Tables and Pagination