newman-reporter-influxdb-jenkins

1.1.2 • Public • Published

newman-reporter-influxdb-jenkins

InfluxDB reporter for Newman that sends the test results information to InfluxDB which can be used from Grafana to build dashboard same as the newman-reporter-influxdb by vs4vijay with few exception , instead of haveing one field which is the value "response time", there is one tag and the rest are fields to be able to select data outputs, also in case of using jenkins to execute newman jobs build number and job name is integrated in the reporter inside newman job and inserted in to influxdb

Prerequisites

  1. node and npm
  2. newman - npm install -g newman
  3. InfluxDB

Installation

npm install -g newman-reporter-influxdb-jenkins

Installation should be done globally if newman is installed globally, otherwise install without -g option


Usage

Specify -r influxdb-jenkins option while running the collection

Usage in jenkins

newman run <collection-url> -r influxdb-jenkins \
  --reporter-influxdb-server <server-ip> \
  --reporter-influxdb-port <server-port> \
  --reporter-influxdb-name <database-name> \
  --reporter-influxdb-measurement <measurement-name> \
  --reporter-influxdb-buildno $BUILD_NUMBER \
  --reporter-influxdb-jobname "$JOB_NAME"  

Usage in bash

newman run <collection-url> -r influxdb-jenkins \
  --reporter-influxdb-server <server-ip> \
  --reporter-influxdb-port <server-port> \
  --reporter-influxdb-name <database-name> \
  --reporter-influxdb-measurement <measurement-name> \

Example:

newman run https://www.getpostman.com/collections/631643-f695cab7-6878-eb55-7943-ad88e1ccfd65-JsLv -r influxdb-jenkins \
--reporter-influxdb-server localhost \
--reporter-influxdb-port 8086 \
--reporter-influxdb-name newman_reports \
--reporter-influxdb-measurement api_results

Options:

Option Remarks
--reporter-influxdb-server IP Address or Host of InfluxDB
--reporter-influxdb-port Port no. (Usually 8086)
--reporter-influxdb-name Database name
--reporter-influxdb-measurement Measurement Point name (If not provided, then reporter will create measurement with prefix newman_results-<timestamp>)
--reporter-influxdb-username (Optional) Username created for InfluxDB (e.g. newman_user)
--reporter-influxdb-password (Optional) Password of the user (e.g. p@ssw0rd)
--reporter-influxdb-mode Transmission Mode http, udp (default: http)
--reporter-influxdb-buildno (e.g. BUILD_NUMBER) Build number variable from jenkins global enviroment variables https://www.jenkins.io/doc/book/pipeline/jenkinsfile/#using-environment-variables (Optional)
--reporter-influxdb-jobname (e.g. JOB_NAME) Job number variable from jenkins global enviroment variables https://www.jenkins.io/doc/book/pipeline/jenkinsfile/#using-environment-variables(Optional)

Compatibility

newman-reporter-influxdb-jenkins InfluxDB
v1.0.0 v1.7

Notes:

  • This reporter currently uses InfluxDB HTTP APIs to send data same as the one from 4vijay

To Do

Contact

for any requests,issues or questions
Email:
mail.fadymaher@gmail.com 

Package Sidebar

Install

npm i newman-reporter-influxdb-jenkins

Weekly Downloads

12

Version

1.1.2

License

MIT

Unpacked Size

48.5 kB

Total Files

10

Last publish

Collaborators

  • fady_maher