I'm not a Node.js developer but I installed Newman Postman just to be able to load test my API.
I want to take advantage of a simple idea suggested at the link below to run multiple API requests in parallel from a batch file. Source: https://community.getpostman.com/t/how-can-i-run-simultaneous-request-parallely/3797/2
Due to my lack of knowledge of Node.js console commands, I'm failing at running the script file. What's the right syntax to run this batch/text file with a list of Postman collections?
I tried:
As a developer at the link above suggested I created myfile.txt file and plugged in:
newman run c:\path...\collection.json -e c:\path...\staging.json &
newman run c:\path...\collection.json -e c:\path...\staging.json &
newman run c:\path...\collection.json -e c:\path...\staging.json
Then I ran the file with:
newman run c:\path...\myfile.txt
Fail.
Then tried running the file this way:
node c:\path...\myfile.txt
No luck.
Then I tried added #!/bin/bash
inside of the file and running the same way but with .sh extension.
Still no luck.
How can I run my simultaneous api calls from the file here ?
c:\
drive you seem to be using a Windows OSIf you want to kick off several parallel version of newman
process (whatever it is) in a Windows cmd.exe interpreter it makes sense to use start command like:
myfile.cmd
Put the following lines there:
start newman run c:\path...\collection.json -e c:\path...\staging.json
start newman run c:\path...\collection.json -e c:\path...\staging.json
start newman run c:\path...\collection.json -e c:\path...\staging.json
However I would rather recommend going for a specialized load testing tool, there is a variety of free and open source load testing solutions which don't have any problems with parallel API tests execution and at the end of test you will get nice tables and charts as I fail to see how you're going to analyze the results of your "load test" with Postman/newman.