Home / ES to CX migration / ES to CX Migration: Generate a test script
ES to CX migration

ES to CX Migration: Generate a test script

Check out my courses Learn Dialogflow ES and Learn Dialogflow CX if you would like to learn Dialogflow in depth. 

This is the fifth part in the series on migrating your ES bot to CX.

When you are migrating your Dialogflow ES bot to CX, you have an important tool at your disposal: the test script.

What is a test script?

First of all, if you are creating a one-and-done FAQ bot, you probably don’t need Dialogflow CX.

This means a CX bot is much more useful if you have a multi-turn conversation with follow up questions.

The test script is a sequence of request-response pairs based on the behavior of your original ES bot.

For example, here is a sample test script for the Dialogflow Messenger decision tree bot which explains the difference between ES and CX.

User: Hi
Bot: Are you building a voice bot?
User: No
Bot: Are you building a pure FAQ bot?
User: No
Bot: Do you need to use slot filling in your bot?
User: Yes
Bot: Use Dialogflow CX

How to generate test scripts

For each leaf node in the Mindomo flowchart, start from the Welcome intent and move down the flowchart (while writing out the script for each leaf node).

For example, in the flowchart below, intents 2, 4, 6, 8 and 9 are leaf nodes – that is, they mark the end of the conversation on the flowchart.

For example, here is the test script for leaf node 8:

User: Hi
Bot: Are you building a voice bot?
User: No
Bot: Are you building a pure FAQ bot?
User: No
Bot: Do you need to use slot filling in your bot?
User: No
Bot: Do you expect lengthy conversations with plenty of follow up questions?
User: Yes
Bot: Use Dialogflow CX 

We do this by following the path from the root (Welcome) intent down to Intent 8 (followup.YES):

1 Welcome -> 3 Voicebot.NO -> 5 purefaqbot.NO -> 7 slotfilling.NO -> 8 followup.YES

Use test script in your CX bot

Now use the same test script in your CX bot once you build it.

Dialogflow CX allows you generate, save and run these test cases in the simulator itself.

You need to make sure that the same intents fire as you run these test scripts.


This website contains affiliate links. See the disclosure page for more details. 
"The magic key I needed as a non-programmer"

The custom payload generator was the magic key I needed (as a non-programmer) to build a good demo with rich responses in DialogFlow Messenger. I've only used it for 30 minutes and am thrilled. I've spent hours trying to figure out some of the intricacies of DialogFlow on my own. Over and over, I kept coming back to Aravind's tutorials available on-line. I trust the other functionalities I learn to use in the app will save me additional time and heartburn.

- Kathleen R
Cofounder, gathrHealth

Similar Posts