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?
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'
I am facing issue in uploading file when I run the collection with newman via CI/CD.However,It works for me when I run locally via newman.It fails only when I run it via CI/CD.
Steps I have followed:
I’ve given the src with the file name that I want to upload.For the sake of simplicity I’ve kept collection file and the file that I upload below in same folder
When this request runs in Jenkins the exact path of the file that I upload would be in ‘C:/Jenkins/Workspace/ApiAutomation/Myproject/collections’. So I have given this as working directory in the newman command