Asserter are additional validators for conversations. For Example if you want to check if the links send by the bot are valid references you can use and asserter called HyperLinkAsserter, which is trying to reach the sent links.
What Asserters are Available ?
When starting a test session, Botium is using a list of asserters:
-
The Botium Core Asserters are available everywhere
-
Asserters that are selected in the Involved Registered Component(s) field
-
Asserters that have the Include in Default Component Set switch enabled
Botium Core Asserters
All asserters from Botium Core can be used in Botium as well.
Botium Enterprise Asserters
Botium includes asserters typically used in test strategies for chatbots:
-
Asserting Hyperlink existance, availability and response in a chatbot response
-
Asserting with custom HTTP/JSON API requests
-
Asserting SQL Database Content
-
and more …
All of these asserters are preconfigured in the Settings / System Settings / Registered Components section.
Enable/Disable Asserters
To enable/disable an asserter:
-
Go to Settings / System Settings / Registered Components
-
Click the asserter in the list to open the edit view
-
Enable/Disable the Include in Default Component Set switch for having the asserter included in all test sessions by default (enabled) or for having it to select manually (disabled)
-
Enable/Disable the Register as global scripting component switch for making the asserter act for all conversation steps (enabled) or for having it to make part of the script (disabled) - behaviour depends on the asserter implementation
-
-
Don’t forget to click the Save button
Register Custom Asserter in Botium
Here are generic instructions how to register and configure an asserter in Botium.
-
Deploy the Asserter Code (NPM-package, Javascript File) to the Botium installation directory
-
Login to botium box with admin rights
-
Goto Global Settings → Components → and click the + NEW button
-
Fill out configuration:
-
Name
-
Component Type Test Case Asserter
-
Include in Default Component Set - asserter is available in all test suites by default
-
Component Ref Code to reference this asserter in your convo files
-
Component Source is a reference to an NPM package or Javascript-File (has to be available on all Botium servers)
-
Also allowed to use the class name of one of the integrated asserters, for example the Intent Confidence Asserter or the Response Length Asserter
-
-
Register as global scripting component to make this asserter be called for all test runs for all convo steps (use with care!)
-
Component Configuration as JSON-formatted configuration options for the asserter (see asserter documentation)
-
-
Click Save
-
DONE
Now you can use the the asserter in convos by simply add the Component Ref Code.
Using Registered Asserters
For a Test Project, you can configure the list of asserters to add in the Involved Registered Components(s) field.
Now you can use the hyper-link-asserter in convos by simply add the Component Ref Code e.g.
Comments
0 comments
Please sign in to leave a comment.