File location to attach a file to the body of a post request
If I attach a file to the body of a post request, then newman can't find it and the test fails. It works fine in postman. What directory should I put the file in for newman to see it.
Is there is a working directory for newman?
The issue might be caused due to the fact that the file you are specifying in newman might not be in the working directory. Try giving the path of the file as following and running the collection again: 1.)Place the file in the same directory where you’re running the Newman command. 2.)Use the --working-dir flag when running Newman: newman run sample_collection.json --working-dir .
Here the dot will take care of the full path of the file
Great suggestion, thanks!!