I have two test which contains a Data Set
1 Test has 5 Data Type(Variable)
it test for A,B,C,D,E
and 2nd Test Test for 2 Data Types(Variables) it Test for A,B
When i run the Collection Runner i’m taking the Highest Number 5 iteration to Test the Collection
my problem is for the 2nd Test also it is testing 5 Times
Can i stop this?
I’m New to Postman. You answers are very Helpful
It sounds like you have a collection with two requests. Requests not tests. The tests are run in the scripting tabs and a request can have multiple tests (or no tests at all). Semantics but an important distinction.
It also sounds like you want run request 1 on every iteration, but request 2 only on certain iterations.
This can be achieved using the skip request feature.
Add an extra column to the data file tell it which requests it should run against.
Then have a pre-request script on request 2 that reads that entry from the data file and skips the request if the name isn’t on the list.
Yes, I have 2 two Requestes
Where i’m using Dataset(Variable values)
Request 1:
“Age”: “{{Age}}”,
var Age = [“20”, “23”, “30”, “40”, “33”];
Request 2:
“Occupation”: “{{Occupation}}”,
var Occupation = [“Student”, “Teacher”];
These both are in same collection
When i run the Collection Req 1 has to run for 5 Feilds and the Req 2 is to run for 2 Time only
So how can i do That
I may use 2 req for seperate collections but i want to do it in only One Colletion.
please let me know how can i do that?
I can’t as I would have to write one and I don’t have many collection runs left in my free quota.
Being new to Postman doesn’t make any difference.
General etiquette is that you at least try this yourself first and then provide details on any areas that you are struggling with. Providing example requests\responses, screenshots and whatever code you currently have.
I’ve provided the logic that can be used.
If you are new to Postman, you should also head over to the Learning Centre.
I would also recommend the “Postman Training” links under Resources.
You can no longer earn badges, but I would recommend the “Galaxy APIs 101” course first as it gets you used to the application features.
Then the “Galaxy Testing and Automation” course which teaches you how to assert the responses.
This will help you learn how to help yourself. Rather than provide you a script that you may not understand which may result in more questions that can most likely be answered by the Learning Centre articles.