https://github.com/qajonatasmartins/wdio-google-chat-service
Webdriverio library to send test results as notification/off message to google chat spaces.
https://github.com/qajonatasmartins/wdio-google-chat-service
google-chat webdriverio
Last synced: 7 months ago
JSON representation
Webdriverio library to send test results as notification/off message to google chat spaces.
- Host: GitHub
- URL: https://github.com/qajonatasmartins/wdio-google-chat-service
- Owner: qajonatasmartins
- Created: 2022-10-23T20:40:27.000Z (about 3 years ago)
- Default Branch: main
- Last Pushed: 2023-09-07T11:59:15.000Z (about 2 years ago)
- Last Synced: 2024-04-25T01:40:45.333Z (over 1 year ago)
- Topics: google-chat, webdriverio
- Language: JavaScript
- Homepage:
- Size: 278 KB
- Stars: 3
- Watchers: 1
- Forks: 2
- Open Issues: 2
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# wdio-google-chat-service
Webdriverio library to send test results as notification/off message to google chat spaces.
## Installation
`npm install wdio-google-chat-service --save-dev`
or
`yarn add wdio-google-chat-service`
## settings
First, import the service into the wdio configuration file `wdio.conf.js`
```
// wdio.conf.js
const GoogleChatService = require('wdio-google-chat-service');
```
To use the service you need to have the google chat webhook url to send the notification and add the url in 'webhook'
Example:
```
services: [[GoogleChatService, {
webhookUrl: 'https://chat.googleapis.com/v1/spaces/xxxxxxxxx/messages?key=xxxxxxxx&token=xxxxxxxxx',
notifyOnlyOnFailure: false //Send notification only in case of test failure
}]
],
```
## Getting google chat webhook
Note: Google chat only has the webhook for business accounts. If you use a personal account you should not have the webhook option.
1. Create a space on google chat
2. Click the arrow on the chat space name
3. Click [Manage Webhooks]
4. Add one or copy the presented webhook Url.
5. Paste the URL of the webhook in the service inside the option 'webhookUrl' as in the example above.
## Features
- Support for mocha runner
- Error details
- Send notification only in case of test failure
## Results
