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/

471 questions
3
votes
1 answer

sendRequest does not seem to use Headers values I specify in the Test

I'm using sendRequest function to send a 2nd request as part of the Test for my 1st request. But it seems that sendRequest does not use the Headers I specify in the function. Any ideas why and how to fix it? Here is part of my Test, that sends 2nd…
KVN
  • 863
  • 1
  • 17
  • 35
3
votes
1 answer

Stop a test running in the pre-request script but not stop the whole test run

Is it possible to stop a test running in the pre-request script but not stop the whole test collection running? I have seen various posts mentioning these ways: postman.setNextRequest(null); throw new Error("Error"); These will stop the test from…
Chris
  • 3,113
  • 5
  • 24
  • 46
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
  • 375
  • 1
  • 3
  • 12
3
votes
2 answers

How do I get my Postman tests to pass using response body as the results?

I am attempting to write tests in Postman for the first time. I am using the pm.test method containing pm.expect. Here is my test: //contract details tests pm.test("Contract data is correct", function() { …
jwatkins
  • 61
  • 2
  • 8
3
votes
1 answer

Can Postman Variables be Passed Into Header?

I am trying to string a few Postman requests together for testing. In the first request I set a global variable as a test script. tests['Status code is 200'] = (responseCode.code === 200); if (responseCode.code === 200) { try { let jwt =…
Matthew
  • 1,461
  • 3
  • 23
  • 49
3
votes
1 answer

postman dynamic unset environment variables

Is there a way to unset environment variables dynamically? I would like to access the environment vars and do a find & replace/delete action so I can test more dynamically. For instance, say I want to test the creation of users, I create vars like…
cutlass
  • 33
  • 4
3
votes
2 answers

Postman App not add cookies to request

I am using postman 6.1.3 and mac os 10.13.4. My login request return a cookie and postman set it to cookies I can see that cookie in postman cookies part. But all the requests after login not add that cookie . Can postman manage all cookies?
nikinci
  • 444
  • 6
  • 25
3
votes
1 answer

Authorization bearer token in postman

Im trying to automate postman tests with Newman. There is an issue with authorization. The authorization bearer token changes and it is dynamic. Does anyone know how to automate this?
Zed
  • 191
  • 2
  • 13
3
votes
2 answers

Postman setNextRequest and workflow

I have a question about how best to chain requests to test multiple workflows in postman. I want to test the following two flows. Each of the boxes is a request set up in postman, but there are requests that are common to both workflows. How do I…
user3603308
  • 355
  • 4
  • 17
3
votes
1 answer

Variables and data files in Postman Collection Runner

I have an API get requests in Postman that uses a data file of voucher codes to look up other information about the code, such as the name of the product the code is for. When using collection runner the voucher codes are passed incorrectly and the…
3
votes
2 answers

Limit Characters returned in Header within Postman Environment

I'm working with an API set that requires a Session Key to be pulled down and used in the Authorization Header for subsequent calls to the service. The value to be added to the Header is X-CardConnect-SessionKey See below for example. The first…
2
votes
1 answer

How to use this as a global function in Postman?

Can you please help me with how to use this function in Postman test script section? () => { var sleep = (sleepDuration) => { var startTime = new Date().getTime(); while (new Date().getTime() - startTime < sleepDuration)…
2
votes
0 answers

Fetching postman response headers in PHP cURL

I am working with an API in postman normally I use 'PHP - cURL' option in code to use it in my PHP file for getting response body. This time I need to access the headers in the response I am seeing on the postman. For example I need to see the…
2
votes
0 answers

Postman datadriven tests

We are doing some assertion checks in Postman. For doing so, we created a collection which is having set of Api's . Now, in order to perform data driven tests , we created a excel file. Here comes an issue when we run the collection through excel .…
2
votes
1 answer

Parallel Request via postman

I have 10 POST requests in a collection and it doesn't have any dependency on each request. When I tried to execute the collection it was running sequentially and it will be time-consuming. As all the requests are independent of each other, Is it…
Sivasakthi Jayaraman
  • 4,724
  • 3
  • 17
  • 27