Get order request in Galaxy testing and Automation collection sends a response in wrong json format

Hi Folks,

When I try the get order request in the Galaxy testing and Automation collection, the response I am getting is a invalid Json.

Found this error when tried to do a schema validation using the sample response, which gave the below error.

There was an error in evaluating the test script: JSONError: No value found for key orderId at 2:16 “orderId”: :1651083080, ^

so any idea how can I finish my test?

Hi
What value is saved in the {{orderId}};

This is the value 1652443072. It is retrieved form the response of the previous post request, from which it set as a global variable.

Just now run the request got the below response

As you can see the extra colon in the response, making it an invalid json. hence I cant do schema validation for the response. That’s my problem.

I think there might be a couple of things going on here…

There is a return character after your orderId variable, you can see this from the little arrow after the variable.
image

And your variable is also being used as the “key” not the “value”, I think this should look more like;
image

2 Likes

Thanks a lot. Changing the path variable in the request did the magic.
Really appreciate the help !

2 Likes