https://github.com/codeforequity-at/botium-connector-holmes
Botium Connector for Wipro Holmes
https://github.com/codeforequity-at/botium-connector-holmes
Last synced: about 1 year ago
JSON representation
Botium Connector for Wipro Holmes
- Host: GitHub
- URL: https://github.com/codeforequity-at/botium-connector-holmes
- Owner: codeforequity-at
- License: mit
- Created: 2019-09-30T10:41:40.000Z (over 6 years ago)
- Default Branch: master
- Last Pushed: 2020-02-20T16:08:38.000Z (over 6 years ago)
- Last Synced: 2025-02-03T06:35:29.799Z (over 1 year ago)
- Language: JavaScript
- Homepage: https://www.botium.at
- Size: 47.9 KB
- Stars: 1
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# Botium Connector for Wipro Holmes
[](https://nodei.co/npm/botium-connector-holmes/)
[](https://app.codeship.com/projects/366879)
[](https://badge.fury.io/js/botium-connector-holmes)
[]()
This is a [Botium](https://github.com/codeforequity-at/botium-core) connector for testing your [Wipro Holmes](https://www.wipro.com/holmes/) chatbot.
__Did you read the [Botium in a Nutshell](https://medium.com/@floriantreml/botium-in-a-nutshell-part-1-overview-f8d0ceaf8fb4) 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:
* [Botium CLI](https://github.com/codeforequity-at/botium-cli/)
* [Botium Bindings](https://github.com/codeforequity-at/botium-bindings/)
* [Botium Box](https://www.botium.at)
## 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": "",
"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](https://github.com/codeforequity-at/botium-core/wiki/Botium-Scripting) files.
## How to start samples
There is two small demos in [samples](./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](./samples/mocked/MockApi) 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 "user@wipro.com".
### 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