{"id":15524367,"url":"https://github.com/codeforequity-at/botium-connector-grpc","last_synced_at":"2025-03-28T20:48:19.356Z","repository":{"id":91176427,"uuid":"299594152","full_name":"codeforequity-at/botium-connector-grpc","owner":"codeforequity-at","description":"Botium Connector for GRPC Endpoints","archived":false,"fork":false,"pushed_at":"2020-10-23T09:35:09.000Z","size":18,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":4,"default_branch":"master","last_synced_at":"2025-03-05T02:19:24.682Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"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,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2020-09-29T11:21:31.000Z","updated_at":"2020-10-23T09:35:11.000Z","dependencies_parsed_at":null,"dependency_job_id":"6651606a-2c3a-44d0-ade4-e2ee8c96af2e","html_url":"https://github.com/codeforequity-at/botium-connector-grpc","commit_stats":{"total_commits":8,"total_committers":2,"mean_commits":4.0,"dds":0.125,"last_synced_commit":"53a4b5d1730926ee31bff0d8a7d58780d79a99e6"},"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/codeforequity-at%2Fbotium-connector-grpc","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/codeforequity-at%2Fbotium-connector-grpc/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/codeforequity-at%2Fbotium-connector-grpc/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/codeforequity-at%2Fbotium-connector-grpc/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/codeforequity-at","download_url":"https://codeload.github.com/codeforequity-at/botium-connector-grpc/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.530Z","updated_at":"2025-03-28T20:48:19.331Z","avatar_url":"https://github.com/codeforequity-at.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Botium Connector for GRPC Endpoint\n\n[![NPM](https://nodei.co/npm/botium-connector-grpc.png?downloads=true\u0026downloadRank=true\u0026stars=true)](https://nodei.co/npm/botium-connector-grpc/)\n\n[![Codeship Status for codeforequity-at/botium-connector-grpc](https://app.codeship.com/projects/2b082bfb-7969-4238-87b7-da396ac59843/status?branch=master)](https://app.codeship.com/projects/2b082bfb-7969-4238-87b7-da396ac59843)\n[![npm version](https://badge.fury.io/js/botium-connector-grpc.svg)](https://badge.fury.io/js/botium-connector-grpc)\n[![license](https://img.shields.io/github/license/mashape/apistatus.svg)]()\n\nThis is a [Botium](https://github.com/codeforequity-at/botium-core) connector for testing your chatbot published on [gRPC](https://grpc.io) server.\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 calls your gRPC endpoint by transforming the Botium internal message representation to match in your .proto file defined schema.\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) (Not integrated yet!)\n\n## Requirements\n* **Node.js and NPM**\n* a bot published on a **gRPC server**\n* a **project directory** on your workstation to hold test cases, Botium configuration and a .proto file\n\n## Install Botium and gRPC Connector\n\nWhen using __Botium CLI__:\n\n```\n\u003e npm install -g botium-cli\n\u003e npm install -g botium-connector-grpc\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-grpc\n\u003e botium-bindings init mocha\n\u003e npm install \u0026\u0026 npm run mocha\n```\n\nWhen using __Botium Box__: Not integrated yet!\n\n## Connecting gRPC chatbot to Botium\n\nFirst you need .proto file, which describe your server schema, \nthen create a botium.json in your project directory with the corresponding gRPC configurations:\n\n```\n{\n  \"botium\": {\n    \"Capabilities\": {\n      \"PROJECTNAME\": \"Botium Project GRPC\",\n      \"CONTAINERMODE\": \"grpc\",\n      \"GRPC_URL\": \"localhost:50051\",\n      \"GRPC_PROTO_PATH\": \"../echoserver/protos/botiumgrpc.proto\",\n      \"GRPC_PROTO_PACKAGE\": \"botium\",\n      \"GRPC_PROTO_SERVICE\": \"Echo\",\n      \"GRPC_REQUEST_METHOD\": \"getReply\",\n      \"GRPC_REQUEST_MESSAGE\": \"{\\\"text\\\": \\\"{{msg.messageText}}\\\", \\\"user_name\\\": \\\"botium\\\"}\",\n      \"GRPC_RESPONSE_FIELD\": \"text\"\n    }\n  }\n}\n```\n\nTo check the configuration (Botium CLI required), run the `hello` command to say \"hello\" to check connectivity or run the `emulator` to bring up a chat interface in your terminal window:\n\n```\n\u003e botium-cli hello\n```\nor\n```\n\u003e botium-cli emulator\n```\n\nBotium setup is ready, you can begin to write your test cases with [BotiumScript](https://botium.atlassian.net/wiki/spaces/BOTIUM/pages/491664/Botium+Scripting+-+BotiumScript).\n\n## How to start sample\n\nThere is a simple *Echo*-bot included, see [samples/echoserver](./samples/echoserver) folder. You have to start it before running the samples:\n\n```\n\u003e npm install \u0026\u0026 npm start\n```\n\nNow you can start the included Botium samples:\n\n```\n\u003e cd ./samples/echo\n\u003e npm install \u0026\u0026 npm test\n```\n\n## Supported Capabilities\n\nSet the capability __CONTAINERMODE__ to __grpc__ to activate this connector.\n\n### GRPC_URL\ngRPC server URL\n\n### GRPC_PROTO_PATH\nRelative url of you .proto file\n\n### GRPC_PROTO\nThe content of .proto file in plain text. (If you use this capability, you have to remove GRPC_PROTO_PATH capability.)\n\n### GRPC_PROTO_PACKAGE\nThe package defined in your .proto file\n\n### GRPC_PROTO_SERVICE\nThe service defined in your .proto file\n\n### GRPC_REQUEST_METHOD\nThe method defined in your .proto file for the service\n\n### GRPC_REQUEST_MESSAGE_TEMPLATE\n[Mustache template](https://mustache.github.io/) for conversating the Botium internal message structure to the gRPC request object as required according to the .proto file.\n\nThe Mustache view contains the Botium internal message structure in the _msg_ field, see [Botium Wiki](https://botium.atlassian.net/wiki/spaces/BOTIUM/pages/38502401/Howto+develop+your+own+Botium+connector#The-outgoing-message). Example:\n\n    ...\n    \"GRPC_REQUEST_MESSAGE_TEMPLATE\": {\n       \"user_name\": \"botium\",\n       \"text\": \"{{msg.messageText}}\"\n    },\n    ...\n### GRPC_RESPONSE_TEXTS_JSONPATH\n[JSONPath expression](https://github.com/dchester/jsonpath) to extract the message text from the gRPC response.\n\n### GRPC_RESPONSE_BUTTONS_JSONPATH (NOT IMPLEMENTED YET!!!)\n[JSONPath expression](https://github.com/dchester/jsonpath) to extract button texts from the gRPC response.\n\n### GRPC_RESPONSE_MEDIA_JSONPATH (NOT IMPLEMENTED YET!!!)\n[JSONPath expression](https://github.com/dchester/jsonpath) to extract media attachments from the gRPC response.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcodeforequity-at%2Fbotium-connector-grpc","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fcodeforequity-at%2Fbotium-connector-grpc","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcodeforequity-at%2Fbotium-connector-grpc/lists"}