I have a postman collection with 3 requests (A,B,C) and I have 3 different environments: "dev", "test", "uat". I would like to create a Run which will run all 3 requests from the collection against the 3 different envs. So the effective runs will be:
env:dev, request A
env:dev, request B
env:dev, request C
env:test, request A
env:test, request B
env:test, request C
env:uat, request A
env:uat, request B
env:uat, request C
Is there a simple way to achieve it in Postman?
Newman will address your question.
Run newman with environment
Demo REST API
Get Animal by [animal name] query https://freetestapi.com/api/v1/animals?search=[animal name]
example
Set three environments (dev/test/uat)
dev environmenttest environmentuat environmentSet three requests (dev/test/uat)
request ATeststabRun on `dev' environment
request BTeststabRun on `dev' environment
request CTeststabRun on `dev' environment
Export collection and environments
Export collectionWill be saved as1-demo.postman_collection.jsonExport environmentWill be saved asdev.postman_environment.jsonOther two environments
Will be saved as
test.postman_environment.jsonWill be saved as
uat.postman_environment.jsonRun
newmanwith three environments by bashSave as
run.shRun it in git bash
Result