Skip to content

Botium Asserters

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 Box 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 Box as well.

Botium Enterprise Asserters

Botium Box includes asserters typically used in test strategies for chatbots:

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 Box

Here are generic instructions how to register and configure an asserter in Botium Box.

  1. Deploy the Asserter Code (NPM-package, Javascript File) to the Botium Box installation directory

  2. Login to botium box with admin rights

  3. Goto Settings → Registered Components → Register new component

  4. Fill out configuration:

    1. Name

    2. Component Type Test Case Asserter

    3. Include in Default Component Set - asserter is available in all test suites by default

    4. Component Ref Code to reference this asserter in your convo files

    5. Component Source is a reference to an NPM package or Javascript-File (has to be available on all Botium Box servers)

      1. Also allowed to use the class name of one of the integrated asserters, for example the Intent Confidence Asserter or the Response Length Asserter
    6. Register as global scripting component to make this asserter be called for all test runs for all convo steps (use with care!)

    7. Component Configuration as JSON-formatted configuration options for the asserter (see asserter documentation)

  5. Click Save

  6. DONE

Now you can use the the asserter in convos by simply add the Component Ref Code.

Using Registered Asserters

When starting a test session, you will have to select the asserters to use in the Select Component(s) field.

For a Test Project, you can configure the list of asserters to add in the Involved Registered Components(s) field.

Note

In case you activated the Include in Default Component Set field when registering the asserter, it will always be part of the test session - no need to add it to this list.

Now you can use the hyper-link-asserter in convos by simply add the Component Ref Code e.g.