cukes icon indicating copy to clipboard operation
cukes copied to clipboard

Help on running a POST on a multipart file

Open julielaursen opened this issue 6 years ago • 0 comments

Scenario: Test form data Given request body is a multipart with control "multipart/form-data" from file "CGI/requests/FormData.txt" Given header apikey with value "apikey" When the client performs POST request on "https://mysite/api/goal/calculate/agent" Then status code is 200

(I have taken out the data that is proprietary) this returns the same body and status code as if I took the parameters out of my call in POSTMAN and ran it manually. When I have the parameters entered in POSTMAN, this returns a 200. When I take out the parameters in postman, it reflects the status code and body here where my test is failing.

I have tried calling all of the different five steps in the Given steps for multipart files or strings. I have also tried entering the multipart data manually such as here: https://speakerdeck.com/larchaon/getting-started-with-cukes-rest?slide=26

I have been working on this for several days and feel like I have tried every combination possible, but still my framework seems to not recognize this file as multipart or does not want to read the parameters.

julielaursen avatar Oct 15 '18 20:10 julielaursen