1

I'd like to write an automated integration test to test my DialogFlow agent, integrated with Google Assistant.

Right now, I need to go through the flows, typing what the users "says" into the Actions On Google test console.

(I guess I could write a selenium script to do this - but it seems to me there has to be a way to do this by API...)

eran
  • 14,496
  • 34
  • 98
  • 144
  • you can use [tag:bespoken] for writing the automated tests, link here: http://docs.bespoken.tools/en/latest/tutorials/tutorial_configuring_api_ai/ – Priyam Gupta Nov 06 '17 at 10:41

1 Answers1

2

Although Dialogflow has an API that lets you issue queries against it, this probably hits the general Dialogflow processing and does not specifically represent what the Assistant would send.

I typically suggest testing against your fulfillment service rather than testing Dialogflow's processing itself. Since your fulfillment server has to be an HTTP[S] server, you can build the JSON body yourself, change the parameters as appropriate, and verify the JSON response. If you need, you can manually do it for some inputs to capture what the JSON will look like first.

Prisoner
  • 49,922
  • 7
  • 53
  • 105
  • There's not currently an API to directly communicate with Actions on Google, so this is the right answer. – Daniel Situnayake Nov 06 '17 at 21:29
  • I wrote a blogpost explaining how test the fulfillment using the JSON requests and responses of Dialogflow: https://xebia.com/blog/how-to-automate-testing-for-google-assistant-apps/ – 0xR May 13 '19 at 11:01