Socket
Book a DemoInstallSign in
Socket

newman-reporter-sql-postgre

Package Overview
Dependencies
Maintainers
1
Versions
1
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install
Package was removed
Sorry, it seems this package was removed from the registry

newman-reporter-sql-postgre

This package based on [tomaszsluszniak/newman-reporter-sql;](https://github.com/tomaszsluszniak/newman-reporter-sql#readme). It was customized to work with multiple SQL Engines such `MySQL`, `MariaDB`, `PostgreSQL` and `Microsoft SQL Server` i just added

1.0.8
unpublished
latest
npmnpm
Version published
Weekly downloads
0
Maintainers
1
Weekly downloads
 
Created
Source

newman-reporter-sql-postgresql

This package based on tomaszsluszniak/newman-reporter-sql;. It was customized to work with multiple SQL Engines such MySQL, MariaDB, PostgreSQL and Microsoft SQL Server i just added httprequestid for my personal usage.

SQL reporter for Newman that sends the test results information to SQL which can be used in Grafana/PowerBI to build dashboard.

npm sequelize license

Getting Started

  • Install newman
  • Install newman-reporter-sql-postgresql

Prerequisites

  • node and npm
  • newman - npm install -g newman
  • Install the desired SQL engine:
$ npm install --save pg pg-hstore  # PostgreSQL
$ npm install --save mysql2
$ npm install --save mariadb
$ npm install --save tedious  # Microsoft SQL Server

Installation

npm install -g newman-reporter-sql-postgresql

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

Usage

Specify -r sql option while running the collection

newman run <collection-url> -r sql-postgresql \
  --reporter-sql-dialect <mysql | mariadb | postgres | mssql> \
  --reporter-sql-server <server-name> \
  --reporter-sql-port <server-port> \
  --reporter-sql-name <database-name> \
  --reporter-sql-table <table-name> \
  --reporter-sql-username <username> \
  --reporter-sql-password <password>

MSSQL Example:

newman run https://www.getpostman.com/collections/631643-f695cab7-6878-eb55-7943-ad88e1ccfd65-JsLv -r sql-postgresql \
  --reporter-sql-dialect mssql \
  --reporter-sql-server localhost \
  --reporter-sql-port 1433 \
  --reporter-sql-name newman_reports \
  --reporter-sql-table api_results \
  --reporter-sql-username sa \
  --reporter-sql-password p@ssw0rd

PostgreSQL Example:

docker run --name postgres -e POSTGRES_PASSWORD=test1234 -p 5432:5432 -d postgres
newman run https://www.postman.com/collections/cb208e7e64056f5294e5 -r sql-postgresql \
  --reporter-sql-dialect postgres \
  --reporter-sql-server localhost \
  --reporter-sql-port 5432 \
  --reporter-sql-name postgres \
  --reporter-sql-table test1234 \
  --reporter-sql-username postgres \
  --reporter-sql-password test1234 \
  --reporter-sql-test-name "test name"

Options:

OptionRemarks
--reporter-sql-dialectSQL Engine. One of: mysql, mariadb, postgres, mssql.
--reporter-sql-serverIP Address or Host of SQL Server.
--reporter-sql-portPort number. Usually: 3306 for MySQL and MariaDB, 5432 for PostgreSQL, 1433 for Microsoft SQL Server.
--reporter-sql-nameDatabase name. Already existing database.
--reporter-sql-tableTable name. Table will be created automatically.
--reporter-sql-usernameUsername created for SQL database (e.g. sa).
--reporter-sql-passwordPassword of the user (e.g. p@ssw0rd).
--reporter-sql-debug (Optional)Reporter debug mode (default: false).
--reporter-sql-test-name (Optional)It can be useful for reporting collected data from a specific test. Example 5 iterations.

FAQs

Package last updated on 06 Jun 2022

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

About

Packages

Stay in touch

Get open source security insights delivered straight into your inbox.

  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc

U.S. Patent No. 12,346,443 & 12,314,394. Other pending.