0

Trying to upload the file

I'm testing a flow of events which one of the steps is to upload a file, this is a RAR file. 

This step is made by POST request and in the body you can add fields and give them a value, also, you can choose a file field and on the right side you can browse and select a file.

This step works properly when testing this step only. But, when you run the whole test folder(with all the test requests) then the file selection back to be unselected and the test can't continue. 

Hope that my problem is clear. Thanks a lot. Amit.

Danny Dainton
  • 23,069
  • 6
  • 67
  • 80
Amit Cohen
  • 41
  • 1
  • 1
  • 6
  • You need to expand on your question and show what you’ve do so far using images etc. This will give you a better chance of getting a specific answer. Is this using the collection runner? – Danny Dainton Jan 17 '18 at 07:44
  • added an image and yes, I'm using collection runner – Amit Cohen Jan 17 '18 at 08:00

2 Answers2

8

Make sure in settings you allow the read files outside from working directory. This worked for me.

Check this screen capture.

derloopkat
  • 6,232
  • 16
  • 38
  • 45
Rajat Bhullar
  • 81
  • 1
  • 1
3

If you’re trying to do this via the collection runner, this functionality isn’t supported.

This is a issue being recently discussed on the Postman GitHub account.

https://github.com/postmanlabs/postman-app-support/issues/3137

One of the ways that you can achieve this is by installing Newman and using this to upload the file during the test run.

Danny Dainton
  • 23,069
  • 6
  • 67
  • 80