2
votes

Scenario

I have a POST request API which accepts Image or File. As shown below:

enter image description here

I can select an image from the Request body as a form-data but, here I can select one image at a time.

But I want to upload multiple images or files as a form-data variable like {{image}} or {{file}} while doing Postman-Collection Runner. As we know, we can only upload text/JSON/CSV file as iteration data in Postman Runner.

Questions: Is there any way from which we can send multiple images or files as Iteration data in Postman Runner or in Newman?

or

Can I have a Postman test script that will upload multiple images or files in Postman Runner?

Or else

Help me in how to upload multiple images using Newman.

Can anyone please help me with this?

1
needs detail or clarity. - Babak Asadzadeh
@ChristianBaumann Thanks for this reference: blog.postman.com/run-collections-with-file-uploads-using-newman I got pretty good clarification on this. But Can you please tell me, Is there any way to send multiple files in the POST request asynchronously? but not at the same time as it's mentioned in the above link. - chandan prasad
Moorthi Rajendiran posted an Answer saying "I referred the below link and updated the setting. Now it is working for me. https://support.postman.com/hc/en-us/articles/360023574653-Storage-of-file-Working-Directory-in-reference-for-collections" - Scratte

1 Answers

0
votes

What you can possibly do is , create those many test cases in your iteration data file. for example if you want to upload 10 images so you can create 10 testcases in your test data file and run it as a part of collection runner