Questions tagged [postman-collection-runner]

Use this tag for issues with Postman Collection Runner; use the [postman] tag for general Postman issues.

You can use Collection Runner to run all the requests of a Postman Collection in one go.

Postman Collection Runner

Reference:
https://learning.postman.com/docs/running-collections/intro-to-collection-runs/

342 questions
4
votes
1 answer

In Postman, how to define pm.iterationData() when NOT using Collection Runner?

My use case is simple: I have a Postman Collection with a few requests, one of them is: GET www.example.com/stores?country={{country}} Then a simple Test: pm.test("Check number of stores", function () { var jsonData = pm.response.json(); …
Siaynoq
  • 392
  • 1
  • 3
  • 12
4
votes
3 answers

How to Test Same Endpoint Multiple Times with Postman Runner

I am trying to write an automated test Runner in Postman. I would like to test the same endpoint multiple times in a single run while changing the value of a parameter. For example I would like to…
Matthew
  • 1,165
  • 14
  • 32
4
votes
6 answers

How do i set up a bearer token in postman from an environment variable?

I have set up a collection in PostMan and am able to save my bearer token value to an environment variable successfully using the following test var jsonData = JSON.parse(responseBody); pm.environment.set("mytoken", jsonData.token); but how do I…
Kirsten Greed
  • 11,170
  • 26
  • 117
  • 234
4
votes
4 answers

Postman console log not allowing to write string in next line

I am trying to display a string on multilines with \n in the Postman Console. How can I do this? Example: var mystr='line\n another line\n another line'; console.log(mystr); Expecting: line another line another line Getting: lineanother…
4
votes
1 answer

Reuse {{$randomInt}} in Postman

My 1st request is: GET http://example.com?int={{$randomInt}}. I need to run 2nd request (with other tests in it) to the same address, so I need to save generated variable. How can I do it? I was trying pm.variables.get("int") in the "Tests" sandbox…
Shurov
  • 342
  • 1
  • 5
  • 18
4
votes
1 answer

In Postman, how to POST binary file use collection runner

I am using the Postman Collection Runner to automate a series of API calls. On one of these API calls I need to submit a binary file as the body of a POST. When setting up the Collection Runner I see how to select a file, but I can't figure out…
4
votes
2 answers

How to set environment variable in postman collection runner?

I have an API named getcampaignlist. It returns me all campaign list with descriptions according to relevant person. Like in image I have multiple campaign with id and description. I want to set environment variable…
4
votes
1 answer

Batch running multiple Newman (Postman) test collections

I have defined several Postman test collections/folders and their associated test data files. Running them through Postman Collection Runner and Newman individually works fine. I wanted to batch multiple runs together, like this .bat in Windows: SET…
zemien
  • 522
  • 5
  • 15
4
votes
2 answers

Postman Collection Runner - How to Save Test Runs to import them back later

How can I save a particular test run so that I can import it later using Import Test Run button on the Runs Tab of Postman Collection Runner.
zip_lock_throw
  • 4,135
  • 4
  • 33
  • 72
3
votes
1 answer

Is it possible to generate an HTML report for Postman Collection run using htmlextra or something similar, without running through newman?

Suppose I run a collection through Postman and export the results. Is there anything that I can use to generate reports from the result export?
Akshay
  • 41
  • 2
3
votes
0 answers

Postman - Access Token Retrieval using Authorisation Code grant type

I have set up a release pipeline to automatically deploy an API artefact to a particular domain, and as part of that pipeline I have introduced the execution of a postman collection via the Newman CLI, the ultimate goal that I want to achieve with…
3
votes
1 answer

Postman- Pass dynamic parameters to collection at run-time which is not part of response

I have created postman collection for unit testing of APIs. I need to handle below scenario. My second API generates OTP and sends it over email but its not part of response. I want to pass that OTP in request body of 3rd API. I am executing postman…
3
votes
1 answer

Postman test is always passing even though it fails

While running postman Tests, Test case seems to be always passing The response body is provided below. I am trying to fetch id when the name is "Erin" and validate that id is 800. Small piece of code that i wrote is below the response body written…
aak
  • 53
  • 5
3
votes
2 answers

postman.setNextRequest(null) is not stopping the iteration in Postman Collection

Note: I'm using a simple test API for this inquiry hoping it will be better to understand my inquiry. The URL for the API is https://jsonplaceholder.typicode.com/users. I'm setting up a Postman Collection with only one Post request to be called. On…
Carlo
  • 31
  • 1
3
votes
0 answers

can an env variable in a newman env json file be set while executing a collection run

I am trying to do the following run newman within a jenkins pipeline. I am executing newman test using docker. However, my collection script has a few variables that need to be set that are dependent on the jenkins pipeline env. (i.e. since each…
Ramdev
  • 355
  • 1
  • 3
  • 11
1
2
3
22 23