Test Scripts Library

What is a test script

A test script on our platform is a way to describe an complete interaction between a user and your bot. These scripts allow our platform to act as a user and chat with your bot as a human would. Then we take your bot's answers and check whether they are consistent with what was expected, based on your script.

For example, you could make a script of a user going through a purchase, from saying hello to giving delivery address details. Or you could have a script where the user asks for support regarding a specific issue and check if your bot offers the appropriate resources.

Test scripts list

On the "Test Scripts Library" page, you are presented with a list of all of your scripts.

The lists shows each script's ID, name and description. Next, you can see the bots in which each script is used. Following, is the date of the last edit. Finally, two buttons allow you to edit and delete a script. Note that you can't delete a script that is being used for testing a bot.

Creating a script

Creating an indicative script for testing is easy (and fun) and helps you keep a user-centered approach when developing a bot.

Script details

You can choose an icon from a list of hundreds emojis, or leave it to the default one, for each script. This feature is to help you to visually distinguish between scripts.

Give a descriptive name for your script. Think of it as a use case and name it appropriately.

Write a short description explaining what this script does. Think in terms of making it easier for a colleague (or your self after some time) to quickly understand what this script is for.

Script builder & visualizer

This is where the magic happens! Crafting compelling scripts to extensively test your bot is both an art and a skill. Let's see how it works.

The builder on the left is the main part. Here is where your script is built, with all the user inputs and the corresponding expected answers. The syntax for writing your script is pretty straightforward: Each line starting with "[user]" is something that a user says. Alternatively, a line that starts with "[bot]" is the expected response from the bot.


Use this logic operator to give possible options to either your expected input or output. You can have many possible options as long as you are placing “[or]” between them. For example, I could have my bot saying:

[bot] Hello [or] Hi

which means that my bot would either answer Hello or it would answer Hi and are both acceptable expected outcomes.


Use the button for when you are expected output is one or two buttons. You replace the “OPTION1” with the button text and you are good to go! For example, let’s say I want my agent to offer a yes/no answer with two respective buttons. Then it will be written like:

[bot] Do you want to continue? [buttons_Yes_No]


Media is used for whenever your agent’s expected output is supposed to be a media output like an image, a gif or a video. Just replace the “URL1” with your media’s url. For example, you may wanna have a fun gif as an answer to a question like “are you human” or “are you a bot”. Including the expected input it should look something like:

[user] Are you a human? [or] Are you a bot? [or] Are you real?
[bot] [media_https://giphy.com/gifs/l0HlVTNKhKnt52olG/html5]
[bot] Well I guess… No!


The var option is for when your expected input or output has a variable in it. In that case, you replace the “NAME” part of the “[var_NAME]” option with the name of the expected variable.

For example, we have an agent that gives you a boarding time and a gate for your flight. That conversation can go like this:

[bot] Ok, for that I will need your flight number?
[user] My flight number is [var_flightNum] [or] [var_flightNum]
[bot] Perfect, for flight [var_flightNum] the boarding time is [var_boardTime]
[bot] and the gate is not yet announced [or] and the gate is [var_gateNum]

All these functions, are conveniently placed as toolbar buttons above the syntax area of the “Script Editor”.

Next to your script, you have a visual representation of it. You can easily have a quick look at your scripted inputs and outputs in a visual graph.

With the import button, you can import a premade script you already have made or someone shared to you, via .txt file, directly into your script.

Copyright © 2020 Enchatted BV. All rights reserved — Privacy PolicyTerms of Service