npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2024 – Pkg Stats / Ryan Hefner

newman-parallel

v1.1.3

Published

A framework to execute multiple Postman collections in parallel run with Newman.Includes Allure, HTML-extra and Junit reporters integrations

Downloads

280

Readme

Newman Parallel

CI

Newman Parallel is an npm package that executes Postman collections in parallel, saving time by running them concurrently. It supports reading collections and environments from separate folders and provides flexibility through command-line arguments.

It will add value if you really have many postman collections to run.

The package has integrated Newman, Allure (allure-results generated automatically), HTMLextra reporter, and Junit for CI.

HTMLextra and Junit reports will e generated in report folder. Allure report will be generated to allure-report folder after all the collections have ran.

For Allure report the command "npx allure generate --clean && npx allure-patch ./allure-report && rm -rf ./allure-report" will run automatically after all the collections run finished. It will generate the Allure html report, patch it as a single page app to be sent via email, webhook or published as a static webpage.

Allure report with history will be generated only if you use GitBash/Bash. If you run the tests with Powershell - the allure history will not be generated automatically.

Installation

npm install -D newman-parallel

Usage

npx newman-parallel [options]

Command-Line Options

  • path: (Required) Path to the folder containing Postman collections.

  • path: (Required) Path to the folder containing Postman environments.

  • C=(name): (Required if no ALL arg provided or no env variables set) Name of the collection/product to filter the collections.

  • E=(name): (Optional) Name of the environment to use.

  • R=(name): (Optional) pass false if you do not need the reports to be generated.

  • D=(path): (Optional) Path to the data file.

  • ALL: (Required if no C= argument provided or no env variables set) to run all the collections from the forlder

Environment variables

  • the process logic will check the environment variables if there is no Name of the collection/product passed in arguments
  • If environment variable equal to the name of the collection's filename is set to true, the framework will run the collection/s that match.
  • If the environment variable ENV is set to name of the enfironment file, the framework will use this environment file (in such case you do not need to pass arg E=, otherwise it will have priority over the ENV var)

Examples

Run all the collections that matching the MyCollection with no environment used:

newman-parallel /path/to/collections /path/to/environments C=MyCollection

Run collections for a specific name with a specific environment and/or data file:

# this will run collection that have MyCollection name using Bash/GitBash

newman-parallel /path/to/collections /path/to/environments C=MyCollection E=MyEnvironment

# this will run collection that have MyCollection and MyCollection2 name using Bash/GitBash

newman-parallel /path/to/collections /path/to/environments C=MyCollection,MyCollection2 E=MyEnvironment

# this will run collection that have MyCollection and MyCollection2 with MyEnvironment and using the datafile name using Bash/GitBash

newman-parallel /path/to/collections /path/to/environments C=MyCollection,MyCollection2 E=MyEnvironment D=< relative path to data file >

Run collections with a specific environment file(or without) depending on the environment variables specified:

# this will run collections that have XXX and YYY names using Bash/GitBash

export XXX=True
export YYY=True
newman-parallel /path/to/collections /path/to/environments E=MyEnvironment

# or without the environment flag passed in arguments
newman-parallel /path/to/collections /path/to/environments

Run all the collections with a ALL argument passed (with or without environment):

# this will run all collections without environment file
newman-parallel /path/to/collections /path/to/environments ALL
# this will run all collections with specified environment file
newman-parallel /path/to/collections /path/to/environments ALL E=MyEnvironment

Notes

If no collection/product name and ALL arg provided, the script runs all collections in the specified folder.

If no environment name is provided, the script does not use any environment.

If no R=false arg provided the reports will be generated automatically.

Contributing

Contributions are welcome!