newman
's direct dependencies. Data on all dependencies, including transitive ones, is available via CSV download.Name | Version | Size | License | Type | Vulnerabilities |
---|---|---|---|---|---|
@postman/tough-cookie | 4.1.3-postman.1 | 30.81 kB | BSD-3-Clause | prod | |
async | 3.2.4 | 149.05 kB | MIT | prod | |
chardet | 1.6.0 | 21.58 kB | MIT | prod | |
cli-progress | 3.12.0 | 16.91 kB | MIT | prod | |
cli-table3 | 0.6.3 | 14.77 kB | MIT | prod | |
colors | 1.4.0 | 11 kB | MIT | prod | |
commander | 11.0.0 | 44.33 kB | MIT | prod | |
csv-parse | 4.16.3 | 148.75 kB | MIT | prod | |
filesize | 10.0.12 | 10.18 kB | BSD-3-Clause | prod | |
liquid-json | 0.3.1 | 18.57 kB | Apache-2.0 | prod | |
lodash | 4.17.21 | 311.49 kB | MIT | prod | |
mkdirp | 3.0.1 | 17.83 kB | MIT | prod | |
postman-collection-transformer | 4.1.7 | 38.71 kB | Apache-2.0 | prod | |
postman-collection | 4.2.1 | 118.11 kB | Apache-2.0 | prod | |
postman-request | 2.88.1-postman.33 | 68.2 kB | Apache-2.0 | prod | 1 1 |
postman-runtime | 7.33.0 | 1.46 MB | Apache-2.0 | prod | 1 2 1 1 |
pretty-ms | 7.0.1 | 3.73 kB | MIT | prod | |
semver | 7.5.4 | 26.25 kB | ISC | prod | |
serialised-error | 1.1.3 | 9.33 kB | Apache-2.0 | prod | 1 1 |
word-wrap | 1.2.5 | 4.31 kB | MIT | prod | |
xmlbuilder | 15.1.1 | 61.4 kB | MIT | prod |
Newman is a command-line collection runner for Postman that lets you effortlessly run and test a Postman collection straight from the command-line interface. It is designed with extensibility at its core, so it can be seamlessly integrated with your continuous integration servers and build systems.
Using Newman is relatively straightforward. To start, ensure that you have Node.js of version 16 or higher installed on your system. Newman can be installed using npm, using the command npm install -g newman
. This globally installs Newman, allowing usage from anywhere. For a local installation, skip the -g
flag. Moreover, Newman can be installed globally using Homebrew, via brew install newman
.
To use Newman, run a command like newman run examples/sample-collection.json
to specify a collection to be run. This can be a local or remote resource (like a URL from Postman's Cloud API service).
To use Newman as a library in your JavaScript projects, simply require Newman in your project:
const newman = require('newman');
newman.run({
collection: require('./sample-collection.json'),
reporters: 'cli'
}, function (err) {
if (err) { throw err; }
console.log('collection run complete!');
});
This will execute your Postman collection and log 'collection run complete!' once finished.
Both Newman's CLI and programmatic capabilities are comprehensive, and include various configurations for reporters (like cli, json, junit), timeouts, delays, bailling, and more. You can find further information and usage examples on Newman's GitHub page.
The comprehensive Newman documentation can be found on its GitHub page at git://github.com/postmanlabs/newman.git. The readme provides an extensive understanding of the library's capabilities, including a Getting Started guide, a usage guide with code examples for both CLI usage and using Newman as a library, command-line options, API references, information on reporters, and more. The documentation is well structured with a detailed table of contents that can guide you through the different sections of the readme.