-
Notifications
You must be signed in to change notification settings - Fork 64
Operation Mode docker
Those capabilities apply to the "docker" operation mode only. Botium uses Docker Compose to construct a sandbox environment for a Chatbot.
Botium will construct a docker container for a chatbot automatically (DOCKERIMAGE and STARTCMD capability), based on a very generic template. In case the Chatbot doesn't have any special requirements on the docker container, this will work in most projects.
In case the Chatbot has special requirements, it is possible to add a file Dockerfile.botium to the Chatbot source code. If Botium finds this file when constructing the docker container, this file will be used instead.
In case the Chatbot depends on infrastructure components which should be placed in a docker container as well, it is possible to add a file docker-compose.botium.override.yml to the Chatbot source code. If Botium finds this file when constructing the docker environment, this file will be added.
Example: the Chatbot depends on a rethinkdb to work properly. A container for initializing and running rethinkdb will be added to the docker environment.
Finally, in case there are local settings you have to apply to the docker containers, Botium will look for a file named docker-compose.botium.override.yml in the current working directoery and add it to the docker environment as well.
Example: On the local machine, all connections have to pass a HTTP proxy. This can be done by adding environment variables to all docker containers.
This behaviour enables Chatbot developers to construct a customized Sandbox environment to run nearly all flavours of Chatbots. As described in the Botium overview, this docker environment contains mocked endpoints for major Chatbot SDKs for Botium to hook in.
The command line to start the Chatbot. This command will be run in the Chatbot directory in the docker container. For Chatbots developed in Node.js, this could be "npm start" for example, or "NODE_ENV=dev node index.js".
Default: "docker-compose"
The path the the Docker Compose executable.
Default: "docker-compose"
The path the the Docker Machine executable (only applicable if DOCKERMACHINE capability is true)
Default: false
In case the local infrastructure is based on Docker Machine and Docker Toolbox, this option has to be enabled.
Default: "node:boron"
The docker image to use for the Chatbot. As Botium itself is developed in Node.js, the default docker image is for Node.js as well.
Default: "false"
Botium names the constructed docker container according to the project name. When running multiple Botium instances in parallel, it can be useful to set this capability to "true" so the container names for parallel sessions won't interfere.
Default: DOCKERSYSLOGPORT_RANGE "47100-47299"
Botium collects the console output from the Chatbot docker container with an integrated syslog server. When running multiple Botium instances in parallel, it can be useful to select different tcp port ranges for each session. When using the "DOCKERSYSLOGPORT_RANGE" option, Botium will select the first free tcp port in this range.
The following settings are required for Facebook Chatbots only
When this capability is "true", Botium will add the mocked Facebook SDK endpoint to the docker environment.
Botium needs to know the TCP port and the Facebook Webhook url path of the Chatbot. The hostname will be derived from the docker environment. For a Chatbot developed with Botkit, typical settings are:
- FACEBOOK_WEBHOOK_PORT: 3000
- FACEBOOK_WEBHOOK_PATH: "facebook/receive"
Default: FACEBOOK_PUBLISHPORT_RANGE "46300-46499"
Botium connects to the mocked endpoint on one of these ports. It could be required to change this if you are running parallel session of Botium.
Default: "true"
In case the Facebook Chatbot requires a delivery confirmation to work properly, set this capability to "true".
The following settings are required for Slack Chatbots only
When this capability is "true", Botium will add the mocked Slack SDK endpoint to the docker environment.
Botium needs to know the TCP port and the Slack Events url path of the Chatbot. The hostname will be derived from the docker environment. For a Chatbot developed with Botkit, typical settings are:
- SLACK_EVENT_PORT: 3000
- SLACK_EVENT_PATH: "slack/receive"
Botium needs to know the TCP port and the Slack Oauth url path of the Chatbot. The hostname will be derived from the docker environment. For a Chatbot developed with Botkit, typical settings are:
- SLACK_OAUTH_PORT: 3000
- SLACK_OAUTH_PATH: "oauth"
Default: SLACK_PUBLISHPORT_RANGE "46100-46299"
Botium connects to the mocked endpoint on one of these ports. It could be required to change this if you are running parallel session of Botium.
The following settings are required for Bot Framework Chatbots only
When this capability is "true", Botium will add the mocked Bot Framework endpoint to the docker environment.
Default: "facebook"
Default: BOTFRAMEWORK_WEBHOOK_PATH "api/messages" Default: BOTFRAMEWORK_WEBHOOK_PORT "3978"
Default: BOTFRAMEWORK_PUBLISHPORT_RANGE "46500-46699"
Botium connects to the mocked endpoint on one of these ports. It could be required to change this if you are running parallel session of Botium.
Botium - The Selenium for Chatbots