botium-connector-holmes
v0.0.2
Published
Botium Connector for Wipro Holmes
Downloads
13
Readme
Botium Connector for Wipro Holmes
This is a Botium connector for testing your Wipro Holmes chatbot.
Did you read the Botium in a Nutshell articles? Be warned, without prior knowledge of Botium you won't be able to properly use this library!
How it works
Botium connects to the API of your Wipro Holmes chatbot.
It can be used as any other Botium connector with all Botium Stack components:
Requirements
- Node.js and NPM
- a Wipro Holmes bot
- a project directory on your workstation to hold test cases and Botium configuration
Install Botium and Holmes Connector
When using Botium CLI:
> npm install -g botium-cli
> npm install -g botium-connector-holmes
> botium-cli init
> botium-cli run
When using Botium Bindings:
> npm install -g botium-bindings
> npm install -g botium-connector-holmes
> botium-bindings init mocha
> npm install && npm run mocha
When using Botium Box:
Already integrated into Botium Box, no setup required
Connecting Holmes chatbot to Botium
Process is very simple, you have to know just the endpoint URL for your chatbot.
Create a botium.json with this URL in your project directory:
{
"botium": {
"Capabilities": {
"PROJECTNAME": "<whatever>",
"CONTAINERMODE": "holmes",
"HOLMES_URL": "..."
}
}
}
To check the configuration, run the emulator (Botium CLI required) to bring up a chat interface in your terminal window:
> botium-cli emulator
Botium setup is ready, you can begin to write your BotiumScript files.
How to start samples
There is two small demos in samples with Botium Bindings. One uses a mocked Holmes API, other one uses real Holmes API.
Mocked sample
You have to start the Mock API first. This API accepts every request, and sends a constant response back.
- Install packages, run Mock API
> cd ./samples/mocked
> npm install && npm mock
- And start the test
> cd ./samples/mocked
> npm test
Real Holmes API sample
- Adapt botium.json in the sample directory if required (change URL, delete other HOLMES_* entries)
- Install packages, run the test
> cd ./samples/real
> npm install && npm test
Supported Capabilities
Set the capability CONTAINERMODE to holmes to activate this connector.
HOLMES_URL
Holmes chatbot endpoint url
HOLMES_SERVICE_URL
Holmes service url
Optional. Default same as HOLMES_URL.
HOLMES_USER
User name
Optional. Default "user".
HOLMES_USER_ID
User id
Optional. Default "[email protected]".
HOLMES_CHANNEL
Channel in escaped JSON format.
Example:
"{\"id\": \"2\",\"type\": \"web\",\"lang\": \"en\"}"
Optional. Default
{"id": "1","type": "web","lang": "en"}
Roadmap
- Support for intent/entity asserter
- Support for sentiment analyze