Hi , I have a question about Api testing by postman
The question is how to test the Api multi threaded.”I have an api which will be used by thousands of users and I need to simulate multiple actions on this api by several users”
Is this available on postman ??
And how can be done?
Kristian
(Kristian)
August 10, 2022, 11:53pm
2
I would LOVE to see this feature added to the collection runner. Something like
Looks like this has been requested, needs more upvotes
opened 09:08PM - 24 Apr 21 UTC
feature
product/integrations
product/runtime
**About me:**
I am a web developer with over 20 years of experience in making w… eb-apps (since 2000).
And I love Postman.
I am using Postman (of/for/with/options) :
- API testing locally (while development)
- In my company's almost all projects
- Non-free version
- Integrated in our CI pipeline (via newman, dockerised, on CircleCi, GitHub and GCP)
- With monitoring, and notifications are sent to Slack
- Synced with GitHub repo (for auto-saving)
- Feature-testing using Postman tests and pre-request-script (obviously)
Now that *that* part is out of the picture, let me jump on the feature requests.
**Feature request 1:** (Problem or rather "need" definition)
Add support of load testing (very similar to what/how k6.io is offering)
To run load testing in k6, there is a similar setup/structure as of Postman that requires API endpoint, parameters, test cases (javascript/web based) etc - which, since I am already using Postman, I don't want to repeat for k6.
We might move to k6 (from Postman) because it provides options to run test-cases on the API as well, but Postman does not provide the option to load-test the APIs.
**Solution that I would like :**
Running "runner" in a "load-testing" mode, so when I select "Runner" and select collection and environment, I would want to see an option (like a toggle button perhaps) that says "Run x number of times" (this feature is what is already there) and next to that should be an option to "Run each request separately" (not existing feature, will be activated via the toggle) and on toggling the option to this, the "number of executions", an input field, is shown next to each API in the collection with a number in it (the environment-controlled default value, perhaps), which would not only run the collection as a whole (while keeping, say, the first iteration of a specific API's response as the variable that could be stored as env. var for following requests), but also will run each single API the number of times it is set to run for each request in the input field defined against it.
E.g. If there are 5 APIs with different parameters running in a collection (or a folder inside a collection) called "User login and logout flow testing", then while running runner, and selecting "Run each request separately", and adding a value of, say, 100 to the "login" API, the runner will run this "login" API 100 times - not sequentially, but in parallel - projecting like a "load-test" for the server.
**Additional context :**
I did not like when I was asked to use "k6.io" for load testing (which says on its website "best developer experience for load testing") and I was able to see clearly that it was not the best experience. Not really good if I compare that to Postman.
I "had" to use k6 because of the load-testing options that it provides - looped/repeated/multi-threaded requests (I don't know how they are doing that), from different geographical locations, amount of time for which tests need to run, or number of times (parallel, not sequential), notifications (Slack or Pub/Sub) and CI pipeline integration (with options, obviously, to have a better DX).
**Feature request 2:**
Enable IDE/Editor support to run (at least *some*) test cases (or just API requests) as extension/plugin of (say) VS Code, PhpStorm, Xcode, Android Studio etc
**Solution that I would like :**
The core idea is that I want to be able to run just (and quickly) a "single" API (GET/POST/PUT) - the one that I am working on right now, from within the IDE/Editor to avoid switching different windows and to have a seamless DX.
**Additional context :**
Recently launched VS Code extension "Thunder Client" (https://www.thunderclient.io) does a great job at mimicking the Postman UI inside VS Code, while adding support of Collections, Environments, and it has gone one step further and have created a UI to allow creating common test-cases (that would be a separate feature-request from this post's POV).
It would be a great improvement in DX if some popular IDEs/Editors get the power of Postman while they are in the code.
Some good/great extension/plugin developer would be a better candidate to share insights on "simplest way Postman's API testing feature can be integrated with an IDE for a better DX".
Feature requests stop.............................
While I see a lot of new things being added to Postman, I don't see any "groundbreaking" or "creative/exciting" stuff happening in the Trello roadmap - at least from a developer POV.
Please see to the above feature requests.
I know that a lot of developers would be more than excited to have these features.
And someone in a unique situation (like mine) should not have to leave Postman.
Thanks