Download Postman Collection Runner

1 view
Skip to first unread message

Michelle Lemay

unread,
Jul 22, 2024, 7:58:34 AM7/22/24
to inchatrobe

I have a folder within a collection. I am using Collection Runner to run the queries within this folder. The second query uses data returned from the first. Therefore if the first query fails any of the tests in its test script, I need the run to stop immediately.

download postman collection runner


Download File --->>> https://urllie.com/2zD5b1



I can understand the Collection Runner having been enhanced with a new feature to allow it to continue upon the failure of a query in a collection, but as a rule, new features in products are added as options - they do not change default behaviour (because that, in general, will cause existing deployments that rely on the default behaviour to break).

Any images of the app/runner or any of the test code you have in the requests, would help paint the picture of what you can see happening in front of you, hopefully it will in turn help others to suggest possible solutions.

Absolutely ingenious. Thank you for this brilliant workaround and clear example. (By the way I would like to add that I find it very weird that Newman has a --bail option but the collection runner in Postman itself does not have any equivalent setting.

Thanks @kclausing , that really helped me too!
The one thing I noticed, however, is that if you have other tests in the same request, they will still be executed. In my case, I added the setNextRequest(null) and setNextRequest() in both, so while the first test failed, the second passed and allowed the collection to continue.

Earlier I tried adding another part of the response into another environment variable, and realised the entire collection was unable to update the environment.
EDIT: This is when the collection is run from the collection runner. IF the requests are sent one by one it is fine.

Oh yes i have done the mistake of not having saved a request properly before, so I made sure this was not the case here before posting.
Alright for visuals, here is the last request from my collection

image851369 20.7 KB
This EventListenerId is the result of a previous request, and must be up-to-date to function properly, which is what I mentioned previously.
the last two pm.environment.set are there for this test.
If I run this collection, no error from lack of eventListenerId, but none of the environment variables change .
I realised that if I send the requests one by one (without the runner), the environment is updated properly. This is highly impractical though.

even I try to verify that if variables are somehow stored in interrupted flow if I uncheck this box but no success, Actually if the checkbox is unchecked, then no variable value is stored even in case of complete runner flow.

Walkthrough

2021 Update:
We have created an updated collection that relies on the same general workflow and principles shown in the following steps. Check out this collection with documentation for getting started:

I know I am a little late to this discussion, but you can use postman.clearEnvironmentVariable(name); to clear any of them out. I created an array of the variable names I needed to clean, and looped through it as part of the test of the final element.

Under my collections folder i have 3 apis chained. When i give iteration 1 it gets executed once. When i give a number 4 it gets executed twice and if 7 thrice and there on.. Is that how its supposed to work.

Hi, thanks for sharing this great article.
Is there anyway to run an individual Post / Get request using a csv file?
This would be useful when testing individual requests before committing them to the collection.

After using the postman, one feature is missing. That is manually disabling the Request which we are not going to use. For example when the feature of project is no more use in that case we need to disable the request service for respective services. If you provide those disable or enable feature in each request it will be great enhancement for Postman.

I am running the postman runner using a json object while executing the post man runner the data for the request payload is not taken from the json file but it takes it from the previously executed api request(same API) without runner. What could be the reason ?

I am trying to run it using runner, where I will post different payloads for different tenants. But while doing so when the postman reads my JSON file it is removing all the escaped characters. How can I avoid it?

Tried the above, I have multiple Child name + Value pairs inside (upto 12 sometimes 15) see eg below; Postman keeps showing error and doesnot allow me to run the collection. What is the modification required?

Hi, I have a json file with an array of f.e. 10 objects. I need to call a request (not a test) 10 times in runner. each time with 1 of those objects as body. I need to get whole object from an array in a file as parameter into body of a request like you get some Variable into URL. With every body unique and every time different number of objects in an array.
Please help.

The second thing is, if I set the environment, the data file etc. and if I switch to another collection, the settings will persist. I i change it and switch back, the new settings are now valid for the first collection.

If you have a Basic subscription, you can only use Collection Runner 25 times per month. If you have Professional, you get 250 runs. If you have Enterprise, you get unlimited. This has nothing to do with Collections run on their cloud resources, which are billed separately. This is specifically for collection runs on your own PC against your own servers.

This is of grave concern for me. A recent Webinar with them on the source control aspects is for sure geared to the high tier of subscription.
We do a lot of API validation testing with Postman - and not necessarily running a whole collection - but folders within it. If the limitations apply there as opposed to full collection monitoring, then as a small business we would have to look elsewhere.
Will keep monitoring this chat for anyone who is able to settle my fears!

The Postman staff have (from what I have seen) been forthcoming on the community forum etc. by providing information about the new limits but also providing details on how else you can run your collections to workaround the limitations.

Newman is a command-line collection runner for Postman. It allows you to effortlessly run and test a Postman Collection directly from the command-line. It is built with extensibility in mind so that you can easily integrate it with your continuous integration servers and build systems.

For example, I had an assert in one method that I removed an hour ago. But CR insists that it is still there.
I have saved the collection multiple times. I have clicked the little orange Sync button. I have restarted Postman. But is makes not difference.

Hi. I have a post api that uploads a document.
When i run it manually the tests pass but when i run it in the collection runner it fails and gives 500 internal server error.I am setting the environment to be correct on the collection runner and i have saved. Please looking for assistance.ThanksCollectionRunnerTest1182112 4.05 KB ManualTest1434518 11.4 KB

Hi Allen, I am using the POST body - where I specify File in the Key column and then select the file from the drop down in the Value column.
Works fine in the main postman work area - but not when used in the Runner.

I am attempting to create a data driven request that has default values defined as variables at the collection level. So, if the request is manually sent the default variables are used, but if the collection runner and a data file are used, the default values are overwritten and replaced with new values from the data file, like so:

In the last tutorial, we learnt about how we can save collections and send POST requests. The requests that we used in the previous tutorial had just a single request. In the real world, when we work we get a huge amount of different requests and responses. Using Postman tests helps in building up efficient requests and collections. For example, if we work as a centralized library for many other libraries at different locations, we need to keep track of every book everywhere. We need to have a list of every book in our system then how do we know if we have a particular book or not and at which library it is available?

When we work in collections, we run many requests together, these can be as large as around 200 requests running simultaneously. How do we manage to see that every request run successfully? Or which one did not give a response? These all things we will learn in this tutorial. In this tutorial, we will focus on the two most important things in postman

Since there are many times that a test is used on different requests and there are many requests present in one collection there arise a need to write some predefined test code which is used again and again or most frequently. In Postman, this section is called snippets. Snippets are the predefined test code in Postman that are written beforehand to use without writing the whole code. Snippets save a lot of time and prevent errors that can happen while writing the code manually.

A collection runner in Postman as previously introduced is used for running a whole collection together. A collection runner runs all the requests in the collection or folder (whatever you choose) at once. Collection runner in Postman does not show any response, it is used to check the test cases whether they passed or not. A collection runner console shows all the tests at one location and their result. To run collection runner first make sure you have at least two requests in the folder MyFolder inside MyFirstCollection as shown.

If you're an avid user of Postman for API testing, you may have encountered a frustrating issue where you hit the limit for running collections. Once you've reached the limit, you'll be prompted with a message that says "You have exhausted all the runs. To keep running collections, create an account..." This can be a real hindrance to your workflow, especially if you're working on a large project or team.

760c119bf3
Reply all
Reply to author
Forward
0 new messages