Dialogflow ES Unit Testing Framework
Generating test scripts
In Dialogflow CX, test scripts are generated in the simulator (where you can just save the Test case). But you don’t have this option in Dialogflow ES. So you need to generate your own test scripts. And test coverage for pure FAQ chatbots is very different from test coverage for multi-turn chatbots.
How to automatically generate the test script
I have built a tool which allows you to automatically generate the test script for your ES bot. Go to the tool page and click on the “How to Use this Tool” button, or click here to read the tutorial.
Continue Reading How to automatically generate the test script
Running Test Scripts
Once you have flattened your ES agent ZIP file into a CSV file, you can use it with PyCharm and run your test scripts. In my Improving Dialogflow ES accuracy course, I explain how you can set up automated conversation testing using Python.
Introduction
Dialogflow CX does have built-in Test Cases. That is one more reason why CX is more powerful and better suited for building complex flows than ES. However, there is no standard framework for ES. If you want to do conversation testing, my suggestion is to
Verbatim vs non-verbatim test phrases
While it might make sense to use an existing training phrase as a test phrase, in practice that is not a good idea. I explain why in this video:
[…] out – like adding a welcome event etc (where it applies). It will also help to generate a test script to check to see if your migration is […]
[…] Dialogflow ES Unit Testing Framework […]
[…] Dialogflow ES Unit Testing Framework […]
[…] one of the best ways to verify if your migration worked properly is to generate a test script for your ES bot and then use the same script inside CX to see if everything works as […]
[…] Dialogflow ES Automated Conversation Testing […]