2

I am using Pact framework to test the response from an API. The responses are in XML format.Shown below is a sample of the response in my pact file.

"response": {
                "status": 200,
                "headers": {
                    "Content-Type": "application/xml"
                },
                "body": "`<rows p1='525'><row><seq_region_id>1</seq_region_id></row></rows>`"
            }

while this works, when the XML response is large, it is difficult to include all of it in the "body" JSON key. Does Pact framework support XML responses, like it does for JSON? I would appreciate it if you could suggest a more suitable way to validate XML responses using Pact

1 Answer 1

0

Sadly, you're out of luck as this functionality is not currently available. We might concentrate on more data types in the future, but as of yet, we have more important priorities to focus on. Cheers.

1
  • 1
    Unfortunately, Ruby does not have an XML matching implementation. That gem is a skeleton that I created in the hopes that someone would do the work! Jun 5, 2017 at 23:32

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.