Do I need to use the generic http connector?

The BUTTONS asserter is asserting on button labels only, not on payload.
For asserting on urls, you can use the hyperlink asserter: GitHub - codeforequity-at/botium-asserter-basiclink: Botium Asserter: Hyperlink
JSON_PATH asserter would also be an option

This is now implemented and will be part of the next release: BotiumScript API Docs — Botium documentation

Will look like this:

...
#end
BOT_CONSUMED
1 Like

@Florian is there a way to assert intents using a wildcard. The dialogflow agent returns intents with numbers at the end e.g. MY_INTENT-2 or MY_INTENT-3. Can i assert using regular expression? e.g. INTENT_LIKE MY_INTENT-*

No, this is currently not possible with the INTENT-asserter. You would have to use the JSON-Path-Asserter for doing this.

Will try that out. I am getting a weird issue when running botium-cli and trying to connect to a dialogflow agent.
Error: Cannot send message to dialogflow container: Cannot read property ‘forEach’ of undefined
at /Users/me/Desktop/botium-conversation-testing/node_modules/botium-connector-dialogflow/dist/botium-connector-dialogflow-cjs.js:1286:13

Cant seem to get passed it. I have updated botium and all dependencies to the latest versions

this is fixed in the latest version 0.0.30 of the dialogflow connector, which is already published.

1 Like

@Florian while trying the JSON_PATH asserter I noticed that the following query doesn’t work
JSON_PATH $.queryResult.intent[?(@.displayName contains 'MY_INTENT')] but this works JSON_PATH $.queryResult.intent.displayName | MY_INTENT the intent display name is MY_INTENT-2. So I am guessing it does a substring match? Any ideas why the first query didn’t work?

First, the contains JSON Path syntax is not supported by the included engine.
Yes, by default there is a substring match done - this can be changed with the new matchingMode global arg to the JSON Path Asserter (Technical Reference — Botium documentation)

1 Like

@Florian I am getting the following error for some of my assertions
error waiting for bot - Calling Hook function failed: Cannot read property 'split' of undefined
Not sure what it means. I am using an excel file for the test cases. This is my assertion:
JSON_PATH $.queryResult.intent.displayName | MY_INTENT
I have about 400-500 assertions and only 6 of them fail every time one after the other. I am not sure why. When i try the utterance manually in the bot everything works fine - the response is correct

Verbose log output would definitly help here

@Florian I added the BOTIUM_VEROSE=1 environment variable and the above is all i got for an error message and just two lines of stacktrace

at BotiumBindings.wrapBotiumError (node_modules/botium-bindings/src/BotiumBindings.js:77:14)
at /opt/atlassian/pipelines/agent/build/node_modules/botium-bindings/src/BotiumBindings.js:134:33

I am using the mocha runner. Is there something different I need for verbose logging?

env variable to set is DEBUG=botium*

I tried that too and also setting --verbose and both times thats all I got

the env variable name is BOTIUM_VERBOSE, maybe that’s the problem ? but actually, the --verbose flag should work as well