I have a chatbot that connects to a dialogflow agent, however, not directly, there is a middleware in between. The request is sent to a custom endpoint first, the request is then pushed to dialogflow, the response returned from dialogflow is then formatted, fallbacks go through another custom built model, and finally the transformed response is sent to the chatbot frontend. When running botium using the dialogflow connector, I don’t get the text response. I get intent information back but that about it. What’s the best approach to testing this bot?
The custom response returned looks something like this The fulfillmentMessages array represents a collection of response bubbles:
{
"responseId": "{{ID}",
"queryResult": {
"fulfillmentMessages": [
{
"text": {
"text": {
"responseJP": "",
"responseES": "",
"responseFR": "",
"response": "OK. I have information on topics."
}
},
"platform": "CUSTOMv1"
},
{
"text": {
"text": {
"responseES": "",
"responseJP": "",
"response": "Please go ahead and ask your question.",
"responseFR": ""
}
},
"platform": "CUSTOMv1"
}
],
"outputContexts": [
],
"queryText": "Answer a question",
"speechRecognitionConfidence": 0,
"action": "",
"parameters": {
"fields": {
}
},
"allRequiredParamsPresent": true,
"fulfillmentText": "",
"webhookSource": "",
"webhookPayload": null,
"intent": {
"inputContextNames": [
],
"events": [
],
"trainingPhrases": [
],
"outputContexts": [
],
"parameters": [
],
"messages": [
],
"defaultResponsePlatforms": [
],
"followupIntentInfo": [
],
"name": "projects/test-proj/agent/intents/{{SessionID}}",
"displayName": "My_CustomIntent",
"priority": 0,
"isFallback": false,
"webhookState": "WEBHOOK_STATE_UNSPECIFIED",
"action": "",
"resetContexts": false,
"rootFollowupIntentName": "",
"parentFollowupIntentName": "",
"mlDisabled": false
},
"intentDetectionConfidence": 1,
"diagnosticInfo": null,
"languageCode": "en",
"sentimentAnalysisResult": null
},
"webhookStatus": null,
"outputAudio": {
"type": "Buffer",
"data": [
]
},
"outputAudioConfig": null,
"adverseExists": false,
"adverseQuery": false,
"adverseEventCaught": false
}