Is It able to run difference requests with different data files in one Collection?

We have a lot of API in different micro-services , and we are trying to put all request test cases in one collection for one micro-service API. then every time, each micro-service has new release, it will automatically run test cases in that one collection;

But It seems like Postman can only run one collection with one data file and set iterations for the whole collection;
In our case, different request has different data file;
Is it able to set up data file and iteration for each request in the same collection?

Thanks!

2 Likes

I have same requirement. Is it possible then how to do it. Please guide.!

Hey @kgkamble, would you mind explaining a little bit more on your use case please? I’m sure we can come up with a way to do what you want.

I’m just having a hard time fully understanding what you are trying to do.

@allen.helton

Thanks for the reply.

PFB the test scenario:

I have one collection which has 4-5 API requests in which I have to pass a few parameters like username, password, or access token, a value in JSON format by using data files. I have already created the required environmental variables, data files. For each request, I have created an independent CSV file. By using a single request and single data file, it works as expected in Postman as well as in Newman.

Now next step is I have to run the entire collection which has an independent data file (CSV) for each request by using Newman. I know by using Postman, we can’t execute this scenario.

Please advise on this. Please reply if you are still struggling to understand the cases.

Why do you need them to be in separate csv files? I don’t think you can do what you want.

Thinking about it from the collection runner/newman’s standpoint, it doesn’t make sense to drive requests off of different data sources in the same collection.

If you combined them all together, it would be able to iterate properly.