JSPM

  • ESM via JSPM
  • ES Module Entrypoint
  • Export Map
  • Keywords
  • License
  • Repository URL
  • TypeScript Types
  • README
  • Created
  • Published
  • Downloads 697
  • Score
    100M100P100Q111219F
  • License ISC

newman report to slack

Package Exports

  • newman-reporter-slackreporter

This package does not declare an exports field, so the exports above have been automatically detected and optimized by JSPM instead. If any package subpath is missing, it is recommended to post an issue to the original package (newman-reporter-slackreporter) to support the "exports" field. If that is not possible, create a JSPM override to customize the exports field for this package.

Readme

newman-reporter-slackreporter

Custom Newman reporter to send message to Slack

Before you get started

Installation

npm i -g newman-reporter-slackreporter

Usage

 newman run <collectionFile> -e <environmentFile> --suppress-exit-code -r slackreporter --reporter-slackreporter-webhookurl '<webhookurl>'

Usage with channel override bot

 newman run <collectionFile> -e <environmentFile> --suppress-exit-code -r slackreporter --reporter-slackreporter-webhookurl '<https://slack.com/api/chat.postMessage>' --reporter-slackreporter-token '<bearer token>' --reporter-slackreporter-chanel '<channel or userid>'

Reporter Options Optionals

 --reporter-slackreporter-messageSize '<messageSize>' e.g 150
 --reporter-slackreporter-token '<bearer token>' e.g xoxb-XXXXXXXXXXXX-TTTTTTTTTTTTTT
 --reporter-slackreporter-chanel '<channel>' e.g #general
 --reporter-slackreporter-buildurl '<buildurl>' e.g ci build url 

Reporter Options

webhookurl Webhook URL to point to the slack api where results are published,If you have multiple channels, you must use the '#' to separate. eg:https://hooks.slack.com/services/TXXX#https://hooks.slack.com/services/NNN

collection Option to add the name of collection file onto the message

environment Option to add the name of environment file onto the message

messageSize Option to change the message size, defaulted to 100

token Option to use bearer token for slack bots for channel override

channel Option to select channel or user receive the result

buildurl The circle ci build url, you can invoke the variable ${CIRCLE_BUILD_URL}