Forum Discussion

basantpathak's avatar
basantpathak
Occasional Contributor
9 years ago

Json response is showing in xml when I run test with datasource

We are using REST service with JSON request and response. I have few test cases which works fine and shows correct Json request and response when I run the test step with out datasource.

 

But if I use the data source to change the parameter in the endpoint to be run at real time, the response shows in xml tab instead of showing it in Json tab (when we select any row and step from the test execution). In Json (for request and response both) it says <Not JSON content>.

 

I have seen this behavior only for endpoint with parameter and using GET method. Have few test which are for POST method and endpoint dont have perameters, here I do get response shown correctly as Json.

1 Reply

  • nmrao's avatar
    nmrao
    Champion Level 3
    You may better check with your team that whether you need to expect the response in JSON format or Xml format. That will help quickly resolve the issue.