postmanlabs / newman

Newman is a command-line collection runner for Postman
https://www.postman.com
Apache License 2.0
6.88k stars 1.17k forks source link

How to Run multiple newman command in single Docker and single container #2054

Closed josephthanaraja closed 4 years ago

josephthanaraja commented 5 years ago

Hello I have three different collections (GET and POST) and wanted to run multiple newman commands in Single Docker container but it is not working. If I create three container it is working fine. Is it possible to use one container and use three newman run command?.

Working one(two docker with two newman separately):- docker run ---name uatpostman1 postman/newman:ubuntu run collection1.json -d collectionData1.json -r cli,junit,htmlextra --reporter-htmlextra-export /var/newman/collection2.html docker run ---name uatpostman2 postman/newman:ubuntu run collection2.json -d collectionData2.json -r cli,junit,htmlextra --reporter-htmlextra-export /var/newman/collection2.html

Expected one(One Docker with 2 Newman run):- docker run ---name uatpostman postman/newman:ubuntu run collection1.json -d collectionData1.json -r cli,junit,htmlextra --reporter-htmlextra-export /var/newman/collection1.html postman/newman:ubuntu run collection2.json -d collectionData1.json -r cli,junit,htmlextra --reporter-htmlextra-export /var/newman/collection2.html

Please help

josephthanaraja commented 5 years ago

Could you please check and update. I wanted to run multiple collections in single Docker container rather than creating an individual container for each collections. Appreciate your help

jordanst3wart commented 5 years ago

Maybe:

docker run ---name uatpostman postman/newman:ubuntu run collection1.json -d collectionData1.json -r cli,junit,htmlextra --reporter-htmlextra-export /var/newman/collection1.html && newman run collection2.json -d collectionData1.json -r cli,junit,htmlextra --reporter-htmlextra-export /var/newman/collection2.html

This is problem with your knowledge of docker, and not a problem with newman. Maybe ask on stackoverflow.

codenirvana commented 4 years ago

Closing as per https://github.com/postmanlabs/newman/issues/2054#issuecomment-532486958

AmanKamboj12 commented 3 years ago

Hello all did we get any resolution for this ? How we can update docker-compose file to run multiple collections ?