feat: Created a mini nodeJS server with NewMan for testing without PostMan GUI.

This will mimic a run in a CD/CI environment or docker container.
This commit is contained in:
Simon Priet
2021-09-08 14:01:19 +02:00
parent 5fbd7c88fa
commit e69a613a37
5610 changed files with 740417 additions and 3 deletions

22
node_modules/newman/lib/reporters/json/index.js generated vendored Normal file
View File

@@ -0,0 +1,22 @@
var _ = require('lodash');
/**
* Reporter that simply dumps the summary object to file (default: newman-run-report.json).
*
* @param {Object} newman - The collection run object, with event hooks for reporting run details.
* @param {Object} options - A set of collection run options.
* @param {String} options.export - The path to which the summary object must be written.
* @returns {*}
*/
module.exports = function (newman, options) {
newman.on('beforeDone', function (err, o) {
if (err) { return; }
newman.exports.push({
name: 'json-reporter',
default: 'newman-run-report.json',
path: options.export,
content: JSON.stringify(_.omit(o.summary, 'exports'), 0, 2)
});
});
};