Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/victorighalo/newman-reporter-slack-webhook
A newman package for automatically sending test report to Slack Webhook
https://github.com/victorighalo/newman-reporter-slack-webhook
api automation newman test
Last synced: 2 days ago
JSON representation
A newman package for automatically sending test report to Slack Webhook
- Host: GitHub
- URL: https://github.com/victorighalo/newman-reporter-slack-webhook
- Owner: victorighalo
- License: mit
- Created: 2020-11-11T07:00:48.000Z (almost 4 years ago)
- Default Branch: main
- Last Pushed: 2020-11-13T10:10:41.000Z (almost 4 years ago)
- Last Synced: 2024-09-24T23:45:26.813Z (2 days ago)
- Topics: api, automation, newman, test
- Language: JavaScript
- Homepage: https://github.com/victorighalo/newman-reporter-slack-webhook
- Size: 30.3 KB
- Stars: 2
- Watchers: 3
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# newman-reporter-slackwebhook
A [newman](https://github.com/postmanlabs/newman) reporter for [slack](https://slack.com/)
newman run
| collection - environment | total | failed |
|--------------------------|-------|---------|
| iterations | 1 | 0 |
| requests | 1 | 0 |
| testScripts | 1 | 0 |
| prerequestScripts | 1 | 0 |
| assertions | 1 | 0 |
| ------------------------ | ----- | ------- |
| total run duration | 100ms | |## Installation
npm install newman-reporter-slackwebhook## Usage
### Set the reporter options as environment variables
Create a .env file in the root of your project and add these configurations.
```
export SLACK_WEBHOOK_URL='https://hooks.slack.com/services/xxx/yyy/zzzzzzzzzzzz'
export SLACK_WEBHOOK_MSG_TITLE='newman run title'
export SLACK_WEBHOOK_MSG_HEADER='newman run header'
```### Run newman test with the reporter option `-r slack`
newman run my-collection.postman_collection.json -x -r cli,slackwebhook --reporter-slackwebhook-url 'https://hooks.slack.com/services/xxx/yyy/zzzzzzzzzzzz' --reporter-slackwebhook-title 'External API Tests' --reporter-slackwebhook-header 'API Tests'