0

I have created a HTTP(S)/JSON Connector to connect my NLP chatbot. But I encountered a problem when writing test cases. Because users say that a question may have multiple different responses. For example, I say "Hi" to the robot, the robot may say "Hello~guy" or "Hello". For this reason, the test result would be fail. This is a test result picture.

I think maybe we can use intent to judge this problem, or let Botium-box judge by adding "or".

And My Chatbot also can response the form , looks like this , that I can click the button.

So, I have two questions to ask.

  1. How to determine if the intent is using http(s)/json Connector?
  2. How to display the form on the Botium box and determine whether the chat bot button is valid?

I have read the wiki, but I can't do it well, thank you very much.

ryan.chen
  • 33
  • 6

1 Answers1

0

Question 1

In Botium there are several options to meet the requirement of being more flexible when asserting the chatbot response.

First of all, you can switch the Matching Mode to something different (see Botium Wiki) - Botium can switch between several options how the text assertions are done, you can even use regular expressions there. By default this is wildcardIgnoreCase, which means you can use the asterisk for doing wildcard matching:

#me
Hi

#bot
Hello*

This appraoch works if the answers are all more or less the same, with some minor deviations. The recommended way of doing this in Botium is using utterance lists: instead of having one convo file, this is split in one convo file and a separate utterances file. Before hello.convo.txt:

#me
Hi

#bot
Hello*

Afterwards hello.convo.txt:

#me
Hi

#bot
UTT_HELLO

And UTT_HELLO.utterances.txt:

UTT_HELLO
Hello
Hello guy
hi dude

Now Botium allows any of those three answers wherever this utterance list is references. You can read more about it in the Botium in a nutshell series.

Question 2

Botium can handle buttons, option lists, carousel cards and more (see Botium Wiki), but the connector has to be prepared for this kind of content. It depends on the chatbot technology if this is supported or not - see the list of official Botium connectors.

In your case, as you are using the generic HTTP/JSON connector, you can either try the SIMPLEREST_BUTTONS_JSONPATH capability, or you can add your own request/response hooks as Javascript code - see Botium Wiki

Florian Treml
  • 1,315
  • 2
  • 7
  • 10
  • Thank you for the prompt reply. – ryan.chen Aug 19 '20 at 02:06
  • I have create the excel and upload to botium , but the error says "Duplicate user examples Following user examples are appearing more than once in this list: "你好阿,我最擅長聊天呢。", "你好,很高興見到你。", ... BOT_GREETING" – ryan.chen Aug 19 '20 at 02:18
  • There is content in excel. https://i.imgur.com/1JNyhy0.png https://i.imgur.com/lYgOqNQ.png – ryan.chen Aug 19 '20 at 02:20