File upload with newman

I want to run my test on server side( in the process of CI) so want to use newman.
Also my test has lots of file upload. but seems newman process doesn’t support file upload by itself.

Is there any good way to test with command line on linux and many file uploading?

Thanks!

  • kousuke

One way to make this work is to replace the values of all src properties for files in request bodies with an appropriate file name, or with environment variables that point to file paths on the CI agent. For instance,
src: '/path/to/file/to/be/uploaded'

or,
src: '{{variable_containing_file_path}}'

1 Like