How to specify "src" file path to files in git repository when running newman via Jenkins

Hi
I have a POST request with file upload in it. I am using newman on a linux server and run my tests via Jenkins. In the Jenkins job I specify the that the postman json file is in a git repo. My files to be uploaded are also in the same git repo. How do I specify the path, in the Postman json (“src:…”) to such a file residing in the git repo? The newman command in Jenkins understands that the json file is in the git repo, but apparently the execution of “src:…” path inside the json file does not.
Jenkions job:
newman run ACAP/postman/acapNewAPI.postman_collection.json…
Here the path to where in the git repo the json file is located is working fine. So why does it not work with specifying:
“src”: “ACAP/postman/testfile.test” or “./ACAP/postman/testfile.test”
I get “no such file” from the Jenkins run

Hey @frille70

Have you tried using this flag, on the Newman run command:

`--working-dir <path>`
Set the path of the working directory to use while reading files with relative paths. Default to current directory. 

Hey @danny-dainton

I am facing same issue so I used option suggested by you and accessed path from GIT repository. When I check console file path is shown correctly but in actual API execution it is not getting referred and so API is failing. Is there any specific way which need to be used to write path in “src” attribute.

Can you please suggest any solution for successfully executing above scenario.

Thanks

1 Like