Postman: How to make multiple requests at the same time

PostPostmanHttprequest

Post Problem Overview


I want to POST data from Postman Google Chrome extension.

I want to make 10 requests with different data and it should be at the same time.

Is it possible to do such in Postman?

If yes, can anyone explain to me how can this be achieved?

Post Solutions


Solution 1 - Post

I guess there's no such feature in postman as to run concurrent tests.

If I were you, I would consider Apache jMeter, which is used exactly for such scenarios.

Regarding Postman, the only thing that could more or less meet your needs is - Postman Runner. enter image description here There you can specify the details:

  • number of iterations,
  • upload CSV file with data for different test runs, etc.

The runs won't be concurrent, only consecutive.

Hope that helps. But do consider jMeter (you'll love it).

Solution 2 - Post

Postman doesn't do that but you can run multiple curl requests asynchronously in Bash:

curl url1 & curl url2 & curl url3 & ...

Remember to add an & after each request which means that request should run as an async job.

Postman however can generate curl snippet for your request: https://learning.getpostman.com/docs/postman/sending_api_requests/generate_code_snippets/

Solution 3 - Post

I don't know if this question is still relevant, but there is such possibility in Postman now. They added it a few months ago.

All you need is create simple .js file and run it via node.js. It looks like this:

var path = require('path'),
  async = require('async'), //https://www.npmjs.com/package/async
  newman = require('newman'),

  parametersForTestRun = {
    collection: path.join(__dirname, 'postman_collection.json'), // your collection
    environment: path.join(__dirname, 'postman_environment.json'), //your env
  };

parallelCollectionRun = function(done) {
  newman.run(parametersForTestRun, done);
};

// Runs the Postman sample collection thrice, in parallel.
async.parallel([
    parallelCollectionRun,
    parallelCollectionRun,
    parallelCollectionRun
  ],
  function(err, results) {
    err && console.error(err);

    results.forEach(function(result) {
      var failures = result.run.failures;
      console.info(failures.length ? JSON.stringify(failures.failures, null, 2) :
        `${result.collection.name} ran successfully.`);
    });
  });

Then just run this .js file ('node fileName.js' in cmd).

More details here

Solution 4 - Post

Not sure if people are still looking for simple solutions to this, but you are able to run multiple instances of the "Collection Runner" in Postman. Just create a runner with some requests and click the "Run" button multiple times to bring up multiple instances.

Solution 5 - Post

Run all Collection in a folder in parallel:

'use strict';

global.Promise = require('bluebird');
const path = require('path');
const newman =  Promise.promisifyAll(require('newman'));
const fs = Promise.promisifyAll(require('fs'));
const environment = 'postman_environment.json';
const FOLDER = path.join(__dirname, 'Collections_Folder');


let files = fs.readdirSync(FOLDER);
files = files.map(file=> path.join(FOLDER, file))
console.log(files);

Promise.map(files, file => {

    return newman.runAsync({
    collection: file, // your collection
    environment: path.join(__dirname, environment), //your env
    reporters: ['cli']
    });

}, {
   concurrency: 2
});

Solution 6 - Post

In postman's collection runner you can't make simultaneous asynchronous requests, so instead use Apache JMeter instead. It allows you to add multiple threads and add synchronizing timer to it

Solution 7 - Post

If you are only doing GET requests and you need another simple solution from within your Chrome browser, just install the "Open Multiple URLs" extension:

https://chrome.google.com/webstore/detail/open-multiple-urls/oifijhaokejakekmnjmphonojcfkpbbh?hl=en

I've just ran 1500 url's at once, did lag google a bit but it works.

Solution 8 - Post

Easiest way is to get => Google Chrome "TALEND API TESTER" Go to help + type in Create Scenario ...or just go to this link => https://help.talend.com/r/en-US/Cloud/api-tester-user-guide/creating-scenario

I was able to send several POST API calls simultaneously.

Solution 9 - Post

You can run multiple instances of postman Runner and run the same collection with different data files in each instance.

Attributions

All content for this solution is sourced from the original question on Stackoverflow.

The content on this page is licensed under the Attribution-ShareAlike 4.0 International (CC BY-SA 4.0) license.

Content TypeOriginal AuthorOriginal Content on Stackoverflow
Questionuser3384231View Question on Stackoverflow
Solution 1 - PostOlha HorakView Answer on Stackoverflow
Solution 2 - PostDaniel BView Answer on Stackoverflow
Solution 3 - PostVolodymyr PopelniukView Answer on Stackoverflow
Solution 4 - PostDanView Answer on Stackoverflow
Solution 5 - PostMichaelView Answer on Stackoverflow
Solution 6 - Postashwath hegdeView Answer on Stackoverflow
Solution 7 - PostCularBytesView Answer on Stackoverflow
Solution 8 - PostJack FarrayView Answer on Stackoverflow
Solution 9 - PostSanjeevView Answer on Stackoverflow