{"id":15524364,"url":"https://github.com/codeforequity-at/botium-connector-simple-socketio","last_synced_at":"2025-03-28T20:48:22.351Z","repository":{"id":39633459,"uuid":"166011785","full_name":"codeforequity-at/botium-connector-simple-socketio","owner":"codeforequity-at","description":"Botium Connector for Socket.io Interface","archived":false,"fork":false,"pushed_at":"2023-02-01T13:21:44.000Z","size":162,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":3,"default_branch":"master","last_synced_at":"2025-03-07T10:48:39.106Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"https://www.botium.ai","language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/codeforequity-at.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2019-01-16T09:26:05.000Z","updated_at":"2022-02-02T07:42:31.000Z","dependencies_parsed_at":"2023-02-17T05:45:25.206Z","dependency_job_id":null,"html_url":"https://github.com/codeforequity-at/botium-connector-simple-socketio","commit_stats":null,"previous_names":[],"tags_count":9,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/codeforequity-at%2Fbotium-connector-simple-socketio","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/codeforequity-at%2Fbotium-connector-simple-socketio/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/codeforequity-at%2Fbotium-connector-simple-socketio/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/codeforequity-at%2Fbotium-connector-simple-socketio/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/codeforequity-at","download_url":"https://codeload.github.com/codeforequity-at/botium-connector-simple-socketio/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":246100489,"owners_count":20723469,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-10-02T10:51:05.014Z","updated_at":"2025-03-28T20:48:22.322Z","avatar_url":"https://github.com/codeforequity-at.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Botium Connector for Socket.io Interface\n\n[![NPM](https://nodei.co/npm/botium-connector-simple-socketio.png?downloads=true\u0026downloadRank=true\u0026stars=true)](https://nodei.co/npm/botium-connector-simple-socketio/)\n\n[![Codeship Status for codeforequity-at/botium-connector-simple-socketio](https://app.codeship.com/projects/6f06f496-45d9-4caf-bce5-c9e24cbd80e6/status?branch=master)](https://app.codeship.com/projects/425011)\n[![npm version](https://badge.fury.io/js/botium-connector-simple-socketio.svg)](https://badge.fury.io/js/botium-connector-simple-socketio)\n[![license](https://img.shields.io/github/license/mashape/apistatus.svg)]()\n\n\nThis is a [Botium](https://www.botium.ai) connector for testing your [Socket.io](https://socket.io/) chatbot interface.\n\n__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!__\n\n## How it works\nBotium connects to the API of your Socket.io chatbot interface.\n\nIt can be used as any other Botium connector with all Botium Stack components:\n* [Botium CLI](https://github.com/codeforequity-at/botium-cli/)\n* [Botium Bindings](https://github.com/codeforequity-at/botium-bindings/)\n* [Botium Box](https://www.botium.at)\n\n## Requirements\n* **Node.js and NPM**\n* a **Socket.io interface**\n* a **project directory** on your workstation to hold test cases and Botium configuration\n\n## Install Botium and Socket.io-Connector\n\nWhen using __Botium CLI__:\n\n```\n\u003e npm install -g botium-cli\n\u003e npm install -g botium-connector-simple-socketio\n\u003e botium-cli init\n\u003e botium-cli run\n```\n\nWhen using __Botium Bindings__:\n\n```\n\u003e npm install -g botium-bindings\n\u003e npm install -g botium-connector-simple-socketio\n\u003e botium-bindings init mocha\n\u003e npm install \u0026\u0026 npm run mocha\n```\n\nWhen using __Botium Box__:\n\n_Already integrated into Botium Box, no setup required_\n\n## Connecting Socket.io chatbot interface to Botium\n\nProcess is very simple, you have to know just the endpoint URL for your chatbot.\n  \nCreate a botium.json with this URL in your project directory: \n\n```\n{\n  \"botium\": {\n    \"Capabilities\": {\n      \"PROJECTNAME\": \"\u003cwhatever\u003e\",\n      \"CONTAINERMODE\": \"simple-socketio\",\n      \"SIMPLESOCKETIO_ENDPOINTURL\": \"...\"\n    }\n  }\n}\n```\n\nBotium setup is ready, you can begin to write your [BotiumScript](https://botium-docs.readthedocs.io/) files.\n\n## Supported Capabilities\n\nSet the capability __CONTAINERMODE__ to __simple-socketio__ to activate this connector.\n\n### SIMPLESOCKETIO_SERVER_MAJOR_VERSION\nThe major version of socket.io server package on the bot side\n\n### SIMPLESOCKETIO_ENDPOINTURL\nSocket.io Host Url\n\n### SIMPLESOCKETIO_ENDPOINTPATH\nSocket.io Endpoint Path - Default /socket.io\n\n### SIMPLESOCKETIO_CLIENT_OPTIONS\nSocket.io client options in json form according to their [documentation](https://socket.io/docs/v4/client-options/)\n\n### SIMPLESOCKETIO_USE_WEBSOCKET_TRANSPORT\nThe default and the recommended value is true. When it's true than in the client options the websocket transport will be used:\n`{transports: ['websocket']}`. We recommend to use websocket transport, because with long http polling, we had a fragile connection \nand it causes troubles in case of sticky session.\n\n### SIMPLESOCKETIO_EMIT_SESSION_REQUEST_EVENT\nThis event is emitted in connect to receive a remoteId in 'session_confirm' event\n\n### SIMPLESOCKETIO_SESSION_REQUEST_HOOK\nJavascript commands which executed before emitting SIMPLESOCKETIO_EMIT_SESSION_REQUEST_EVENT. Global variables available: socketOptions, container, context, botium\n\n### SIMPLESOCKETIO_COOKIE_AUTOFILL\nWhen it's true in pollComplete event the cookies from the server are replicated in the extraHeaders property of client options\n\n### SIMPLESOCKETIO_START_HOOK\nJavascript commands which executed at the beginning of start function. Global variables available: socketOptions, container, context, botium\n\n### SIMPLESOCKETIO_STOP_HOOK\nJavascript commands which executed at the beginning of stop function. Global variables available: socketOptions, container, context, botium\n\n### SIMPLESOCKETIO_USERSAYS_EVENT_HOOK\nJavascript commands which executed before emitting SIMPLESOCKETIO_EVENT_USERSAYS. Global variables available: socketOptions, container, context, botium\n\n### SIMPLESOCKETIO_BOTSAYS_EVENT_HOOK\nJavascript commands which executed at the end of SIMPLESOCKETIO_EVENT_BOTSAYS function. Global variables available: socketOptions, container, context, botium\n\n### SIMPLESOCKETIO_EVENT_USERSAYS\n#me Event Name\n\n### SIMPLESOCKETIO_SENDTEXT_FIELD\nPayload Field for Text Input\n\n### SIMPLESOCKETIO_SENDMEDIA_FIELD\nPayload Field for Attachments Input\n\n### SIMPLESOCKETIO_SENDBUTTON_FIELD\nPayload Field for Button Input\n\n### SIMPLESOCKETIO_EVENT_BOTSAYS\n#bot Event Name\n\n### SIMPLESOCKETIO_RECEIVETEXT_JSONPATH\n[JSONPath expression](https://github.com/dchester/jsonpath) to extract Text Response\n\n### SIMPLESOCKETIO_RECEIVEATTACHMENTS_JSONPATH\n[JSONPath expression](https://github.com/dchester/jsonpath) to extract Attachments Response\n\n### SIMPLESOCKETIO_RECEIVEBUTTONS_JSONPATH\n[JSONPath expression](https://github.com/dchester/jsonpath) to extract Buttons Response\n\n### SIMPLESOCKETIO_RECEIVECARDS_JSONPATH\n[JSONPath expression](https://github.com/dchester/jsonpath) to extract Cards response\n\n### SIMPLESOCKETIO_RECEIVECARD_CARD_TEXT_JSONPATH\n[JSONPath expression](https://github.com/dchester/jsonpath) to extract Cards Text response\n\n### SIMPLESOCKETIO_RECEIVECARD_CARD_SUBTEXT_JSONPATH\n[JSONPath expression](https://github.com/dchester/jsonpath) to extract Cards Subtext response\n\n### SIMPLESOCKETIO_RECEIVECARD_CARD_BUTTONS_JSONPATH\n[JSONPath expression](https://github.com/dchester/jsonpath) to extract Cards Buttons response\n\n### SIMPLESOCKETIO_RECEIVECARD_CARD_ATTACHMENTS_JSONPATH\n[JSONPath expression](https://github.com/dchester/jsonpath) to extract Cards Attachments response\n\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcodeforequity-at%2Fbotium-connector-simple-socketio","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fcodeforequity-at%2Fbotium-connector-simple-socketio","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcodeforequity-at%2Fbotium-connector-simple-socketio/lists"}