Giter Site home page Giter Site logo

newman-parallel-run's Introduction

Running multiple Postman Collection in parallel

A known limitation of the Postman Collection Runner is that it can only execute collection in a consecutive way.

This project is a simple implementation of the solution explained in this StackOverflow conversation.

Recent changes

Added a new postman collection that call for a public api: https://openlibrary.org/dev/docs/api/lists so the project can be run right away after checkout.

Create your Postman Collection and corresponding tests

Here I needed to attack first /api/persons to get the list of persons ids.

Test of /api/persons

And then /api/persons/:id for each person in the list.

Test of /api/persons/:id

To do that I used the postman.setNextRequest() tricks that specify the next request that will be executed in the collection run. And in each run I get the last personId and pop() it from the array in environment variables.

Export your collection and the environment variables

Export collection

And save the files in a postman/ directory.

Create the new npm project

Simply run npm init -y and install the 3 dependencies: npm i async newman path newman-reporter-html

The script !

Specify the number of concurrent run, iterations inside each of them, the path for your postman collection and environment execute the script with npm start [NumberOfRuns] [NumberOfIterations] [Collection] [Environment] npm start 2 2 'postman/postman_collection_open_source.json' 'postman/localhost.postman_environment.json'

running results

newman-parallel-run's People

Contributors

ebalpe avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.