How to write a postman test to compare the response json against another json?

后端 未结 6 1396
闹比i
闹比i 2021-01-06 12:41

I have the below json response after running a postMan test of a Rest API:

    {
    \"glossary\": {
        \"title\": \"example glossary\",
        \"Gloss         


        
6条回答
  •  清酒与你
    2021-01-06 13:27

    Looks like the same question asked at POSTMAN: Comparing object Environment variable with response's object which also lists a solution that works, which is to use JSON.stringify() to turn the objects into strings and then compare the strings.

提交回复
热议问题