"botium-cli emulator console" fails with "Error: Capability 'CONTAINERMODE' or 'BOTIUMGRIDURL' missing"

243 views Asked by At

I have configured botium-cli docker image, but when I try to run botium-cli emulator console, I get the following error. Please help me to fix this issue.

Also I would like to know how do I integrate this with our in-house developed chatbot. We have chatbot restful services.

PS C:\Users\SUNDASU\Desktop\react-plugin\botium> botium-cli emulator console
Error: Capability 'CONTAINERMODE' or 'BOTIUMGRIDURL' missing
    at C:\Users\SUNDASU\AppData\Roaming\npm\node_modules\botium-cli\node_modules\botium-core\src\BotDriver.js:299:17
    at new Promise (<anonymous>)
    at BotDriver._validate (C:\Users\SUNDASU\AppData\Roaming\npm\node_modules\botium-cli\node_modules\botium-core\src\BotDriver.js:290:12)
    at C:\Users\SUNDASU\AppData\Roaming\npm\node_modules\botium-cli\node_modules\botium-core\src\BotDriver.js:125:16
    at C:\Users\SUNDASU\AppData\Roaming\npm\node_modules\botium-cli\node_modules\async\dist\async.js:2948:28
    at replenish (C:\Users\SUNDASU\AppData\Roaming\npm\node_modules\botium-cli\node_modules\async\dist\async.js:440:21)
    at C:\Users\SUNDASU\AppData\Roaming\npm\node_modules\botium-cli\node_modules\async\dist\async.js:445:13
    at eachOfLimit$1 (C:\Users\SUNDASU\AppData\Roaming\npm\node_modules\botium-cli\node_modules\async\dist\async.js:471:34)
    at awaitable (C:\Users\SUNDASU\AppData\Roaming\npm\node_modules\botium-cli\node_modules\async\dist\async.js:208:32)
    at eachOfSeries (C:\Users\SUNDASU\AppData\Roaming\npm\node_modules\botium-cli\node_modules\async\dist\async.js:658:16)
1

There are 1 answers

0
Florian Treml On

It looks like Botium CLI cannot find botium.json - did you initalize the project directory ?

botium-cli init
botium-cli run

Then open the botium.json file with a text editor and adapt the capabilities. For a HTTP/JSON interface Botium has a configurable adapter (see Botium Wiki). A sample configuration looks like this:

{
  "botium": {
    "Capabilities": {
      "PROJECTNAME": "Simple Rest Sample",
      "CONTAINERMODE": "simplerest",
      "SIMPLEREST_URL": "https://demo.botiumbox.com/iambotium/reply",
      "SIMPLEREST_METHOD": "POST",
      "SIMPLEREST_RESPONSE_JSONPATH": "$.reply",
      "SIMPLEREST_BODY_TEMPLATE": { "username": "botium", "message": "{{msg.messageText}}" }
    }
  }
}

Apart from that, all major chatbot platforms are supported out of the box - Dialogflow, Watson, Azure Bot Service, Alexa, ... find the full list here).