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
-
node
andnpm
-
newman
-npm install -g newman
- InfluxDB
npm install -g newman-reporter-influxdb-jenkins
Installation should be done globally if newman is installed globally, otherwise install without
-g
option
Specify -r influxdb-jenkins
option while running the collection
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"
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
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) |
newman-reporter-influxdb-jenkins | InfluxDB |
---|---|
v1.0.0 | v1.7 |
- This reporter currently uses InfluxDB HTTP APIs to send data same as the one from 4vijay
for any requests,issues or questions
Email:
mail.fadymaher@gmail.com