Skip to content

Help on running a POST on a multipart file #148

@julielaursen

Description

@julielaursen

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions