i cant do my download/upload file-requests via collection runner, because i manually have to choose a file in body everytime before.
This leads to two different ideas of getting this problem done:
1: Is it possible to set Body-Key/Value(File) via Pre-Request script?
Before request, do:
set Value to Key “content”, Value “File - please Choose” to "C:…"
Then do the request
Then do Test
Because if this would be possible i could do my automated testing via Postman Runner without newman¡
Idea 2 of getting this problem done: Use Newman.
I tried. its Newman run ‘COLLECTION’ -e ‘ENVIRONMENT’ --globals ‘GLOBALS’
I linked my collection, env and globals in it and newman starts its run. My tests in Postman contain a lot of variables which i fill during the test. Every Testcase in newman crashes because every variable (which runs perfectly fine via postman) is “undefined” in newman and the test is failed…
Maybe someone can give me a tip if my idea with the pre-request-script is possible (and how, cause i tried…) and/or where my mistake is with my approach to newman.
Thank you very much!