0

With Botium will I able to handle different set of responses ? I mean different count.

Sometimes i get two responses, some time i get only a single response for the same input text. The chat bot will return two responses in case of success and one single response during failure.

If I always get one response, but only the response value going to be different, the I can use utterances file to add all those varied responses.

But if the count itself is going to be different, how can i handle it ?

Albie Morken
  • 215
  • 1
  • 4
  • 14
  • Scenario -1 #me what is the status of invoice 10001 #bot The invoice is #bot More details Scenario -2 ------------ #me what is the status of invoice 10001 #bot The invoice status not available – Albie Morken Mar 13 '20 at 06:48

1 Answers1

1

These are two different test cases and should be handled as such - two different convos. From a test automation perspective, when following a given transcript with the chatbot, it is not possible to decide if the transcript should continue or it should wait for an additional response.

For example:

#me
hello bot

#bot
hello

#bot
how are you

#me
please tell me the weather

If the bot sometimes sends the "how are you" and sometimes it doesn't, how should Botium know when it should continue with the "please tell me the weather" ? Should it wait two seconds for the "how are you" ? Or should it wait eight seconds for another response before conversation continues ?

UPDATE 20.03.2020

You cannot do what you want with the Fluent interface, but with the async BotiumDriver API it is possible (turn function is just sending text and receiving an answer).

const driver = new BotDriver()
const container = await driver.Build()
await container.Start()

let answer = await turn(container, "order number 1")
if (answer.startsWith("here are the details for order")) {
  await turn(container, "thank you")
} else {
  await turn(container, "thanks for nothing")
}

As a showcase how to handle this with Botium Core, here is some sample code: https://repl.it/@FlorianTreml/replit-botium-bindings-albie-1

Florian Treml
  • 1,315
  • 2
  • 7
  • 10
  • Botium should provide that handle, so that we can tell Botium whether to wait or not dynamically based on the initial response. In my case, I would know that there won't be more response, if the initial response is "The invoice status not available". Only if I could tell Botium. – Albie Morken Mar 16 '20 at 05:45
  • At-least there should be a provision in the botium-core. We expect that there should be a handle for 'Fluent' in 'waitForBot', which we can use to waitForBot or proceed with the next utterance, based on the initial response. Currently everything should be decided upfront, if we have to use Botium. It would be always better to dynamically create the conversation, since there are external factors which decides the way how the chat bot should respond. Chat bots are evolving. – Albie Morken Mar 16 '20 at 05:46