Skip to content
This repository has been archived by the owner on Dec 1, 2023. It is now read-only.

A newman reporter for slack

License

Notifications You must be signed in to change notification settings

AdCellerant/newman-reporter-slack

 
 

Repository files navigation

newman-reporter-slack

A newman reporter for slack

This fork will @mention specified individuals or channels when tests fail.

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-slack

Usage

Set the reporter options

Reporter option can be set as environment variables or from reporter options arguments

export SLACK_WEBHOOK_URL='https://hooks.slack.com/services/xxx/yyy/zzzzzzzzzzzz'
export SLACK_CHANNEL='#slack-channel'
export TITLE='newman run title'
export HEADER='newman run header'
export SLACK_FAILURE_ALERT='<userId>'

Run newman test with the reporter option -r slack

newman run my-collection.postman_collection.json -r cli,slack --reporter-slack-channel '#slack-channel' --reporter-slack-webhook-url 'https://hooks.slack.com/services/xxx/yyy/zzzzzzzzzzzz'

About

A newman reporter for slack

Resources

License

Code of conduct

Stars

Watchers

Forks

Packages

No packages published

Languages

  • JavaScript 100.0%