File upload scenario through Jenkins using Newman API options

Hi All,

I am new to postman and working on the scenario to upload file with api and run through jenkins. We are using the bit bucket as repositories and using the newman api options to run the postman collection. Please find the below newman code:

await postman({
collection: [url to postmanCollection],
environment: [postmanEnvironment],
iterationData: [url to postmanDataFile],
reporters: [‘cli’, ‘json’, ‘htmlextra’],
reporter: {
json: {
export: results.json
},
htmlextra: {
export: results.html
}
}

if we are placing the files in git repo (same as the collection json file), I am getting the 500 response.

Collection.json screenshot:

image

Response screenshot:

image

Can anyone please let me know what can I do to run the file upload scenario through Jenkins. can we set url as workingDir option in newman command ?

Note: we are using the newman api options to run the collection. so how can we set the workingDir option as url.