WebdriverIO(Selenium or Appium) Chatbot Unavailable

Yes I found that and did that. Now as per your guide in 10 Minutes: Codeless Test Automation for IBM Watson Chatbots | by Florian Treml | Chatbots Magazine, I am running Botium in “emulator”mode. Getting an error this time as below:

I have just created only the botium.json file as per your instruction. Sharing that for your reference purpose.

Can you please suggest why I am getting the error when I run the botium in emulator mode please.

you have to map the local directory as volume with the -v option, and for the emulator you have to add the -it options, as written in those instructions

Hello @Florian , I have followed the instructions mentioned. Sharing the command that I have used.
My working directory is : C:\Users\SAYOMGHOSH\Documents\BOTIUM\Anthem and only the botium.json file is located here. Sharing the snapshot of the same:

Also sharing the botium.json file:

So the command that I have used is as below as per your tutorial:
docker run --rm -v C:/Users/SAYOMGHOSH/Documents/BOTIUM/Anthem -it botium/botium-cli emulator console --config C:/Users/SAYOMGHOSH/Documents/BOTIUM/Anthem/botium.json

It is throwing the error as below:

Also I am getting the same error while i am giving this command as mentioned in the botium-cli documentation:
docker run --rm -v C:/Users/SAYOMGHOSH/Documents/BOTIUM/Anthem -it botium/botium-cli emulator console

The volume in the -v option has to be mapped to the directory /app/workdir like this:

 ... -v yourlocaldirectory:/app/workdir ...

Hi @Florian,
Actually I am not getting by local directory…so here my working directory is C:\Users\SAYOMGHOSH\Documents\BOTIUM\Anthem as i mentioned earlier.
So are you saying this command to run?
docker run --rm -v yourlocaldirectory:C:/Users/SAYOMGHOSH/Documents/BOTIUM/Anthem -it botium/botium-cli emulator console --config C:/Users/SAYOMGHOSH/Documents/BOTIUM/Anthem/botium.json

Can you please assist.

docker run --rm -v C:/Users/SAYOMGHOSH/Documents/BOTIUM/Anthem:/app/workdir -it botium/botium-cli emulator console

Thanks @Florian this works now…

As a next step, I want to generate the test cases from the IBM Watson Assistent workspace and for that i have written the command as below like what you have mentioned in our note:

docker run --rm -v C:/Users/SAYOMGHOSH/Documents/BOTIUM/Anthem:/app/workdir -it botium/botium-cli watsonimport watson-intents --config C:/Users/SAYOMGHOSH/Documents/BOTIUM/Anthem/botium.json --convos C:/Users/SAYOMGHOSH/Documents/BOTIUM/Anthem/holding/test/cases

However when I run this, I am getting this error of Unknown argument: watson-intents.

Is there anything missing in my command?

first you have to know that when pointing to a directory keep in mind that it has to be given from the docker container point of view. your local directory is mapped as volume to /app/workdir (pls read the documentation). pointing to a local directory doesnt work.

second, this article is rather old, command naming possible changed. run it with the help option to see the allowed commands (as written in the docs …)

Thanks @Florian …went through the docs as you suggested and got the command to generate test cases working…here is the command:
docker run --rm -v C:/Users/SAYOMGHOSH/Documents/BOTIUM/Anthem:/app/workdir -it botium/botium-cli watsonimport --config C:/Users/SAYOMGHOSH/Documents/BOTIUM/Anthem/botium.json --convos convos

This generates all the possible convos pefectly :

Now to the final part of running the test cases, i have done through the docs and running this command

docker run --rm -v C:/Users/SAYOMGHOSH/Documents/BOTIUM/Anthem:/app/workdir -it botium/botium-cli run --reporter-options json --config C:/Users/SAYOMGHOSH/Documents/BOTIUM/Anthem/botium.json --convos convos

What I am observing is that this is showing as 0 passing. Any idea what can be the issue here?

by default, only utterance lists (from the user examples) with all the user examples in the Watson workspace are downloaded - these are the files ending in .utterances.txt. You can use them as test case by using the –expandutterances switch.

I will update the outdated article in the next days

Hello @Florian , even if i do that as you can see from my below command,

docker run --rm -v C:/Users/SAYOMGHOSH/Documents/BOTIUM/Anthem:/app/workdir -it botium/botium-cli run --reporter-options json --config C:/Users/SAYOMGHOSH/Documents/BOTIUM/Anthem/botium.json --convos convos --expandutterances

I see get the same result.

Is there anything more commands that I need to apply to make this work?

Hi @Florian actually i have a small demo to be shown to client today about the capabilities of Botium…hence was thinking can you please help to give me a workaround solution(if thats okie with you) to generate this please.

I updated the blog article. The command line should actually be:

docker run --rm -v C:/Users/SAYOMGHOSH/Documents/BOTIUM/Anthem:/app/workdir -it botium/botium-cli run json --convos convos --expandutterances yes
  • botium.json is in the current working directory, so you don’t have to tell Botium explicitly
  • if you are doing this, then remember that from the docker container point of view, everything has to point to somehwere below /app/workdir, as it doesn’t know about your windows directory structure

Thanks @Florian it does the trick :slight_smile:

I will now target Botium-Rasa integration. Hope the document is up-to date :slight_smile: and will let you know if I any observations to share with you.

1 Like

Hi @Florian , one quick observation as I am going through the generated Mochawesome report…what I am seeing from the Conversation Log is that for each of the utterence texts, the bot is always sending the same responses…why is that? any specific reason? But ideally when I lauch the chatbot seperately, i get different bot responses as expected.
Can you please advise.

hmm … one possible reason could be that in Botium there is a totally fresh user session started for each test case, while when doing it manually the user session might be reused. this could have an effect on the randomizer that chooses from a number of responses in the dialogue model.
Other than that, I have no idea.

okie…can this be tackled in some way so that the session is reused for all the test cases that are running in botium-cli

no, currently there is no option for this

So is this a current limitation of Botium we can say?