👉 Want to learn more about Postman? Check my complete Postman online course. vdespa.com/courses/?q=KZbin
@snagananda6965 ай бұрын
Great video. The expected responses and requests using a json file with base 64 encoding was genius
@vdespa5 ай бұрын
@@snagananda696 Thanks, glad it helped.
@a.v.sanchez91933 жыл бұрын
Thank you. This is tremendously helpful! I highly recommend this tutorial to anyone testing an api with a microservice architecture.
@vdespa3 жыл бұрын
Thanks ☺️
@hugfil4 ай бұрын
Great video, thanks. Can you tell me if the test passes in the case that the responses are identical but in a different order?
@rohithkumar9120 Жыл бұрын
Is there a way to validate the two response with dynamic change in values without delete?
@FiRese7eN4 жыл бұрын
Great videos dude. They are very helpful and clear! Thanks.
@vdespa4 жыл бұрын
Thanks. I am glad they are useful!
@teleport964 жыл бұрын
Thanks for the video! Tell me please, where I can find documentation about "delete" word in the Tests section? Maybe there are other "functions" I can use because I see this way of deleting props from the response in Postman for the first time. Thank you in advance.
@vdespa4 жыл бұрын
Thanks for watching. I forgot to mention: this is simply a Javascript functionality, has nothing to do with Postman itself.
@deboratoshiekohara27233 жыл бұрын
@@vdespa Hello, first of all congrats! Awesome video. I was trying to find a documentation on the delete too, I was trying to use it here, however I keep receiving a TypeError: Cannot convert undefined or null to object, whereas if I comment the delete line I receive the response. Any thougts of what I am doing wrong? const response=pm.response.json(); delete response.headers['uomId','quantity','totalValue','tax','cost']; pm.globals.set("expectedResponse",response); console.log(btoa(pm.response.text()));
@vdespa3 жыл бұрын
@@deboratoshiekohara2723 Hey Débora, thanks for your comment. Please check again your code. In the video i have shown you something else.
@dailylife15042 жыл бұрын
How can I show different values of 2 responses?
@vdespa2 жыл бұрын
I am not sure what you mean by that. Could you share more details?
@HaiderAli-cf8vj2 жыл бұрын
Sir How to Get Body Data?????????
@HaiderAli-wt4jp2 жыл бұрын
Sir, Plz Give me an Answer
@srida999 Жыл бұрын
Thanks but I am looking for a tool/code that does comparison on the fly by taking runtime traffic(queries). My project cannot rely on canned queries, since queries change all the time. Any tips or advice appreciated. I plan to develop the code myself (2/3 on a 10 in coding), but if i can find some tips, that would help.
@vdespa Жыл бұрын
Have you looked into just defining a JSON schema to test the structure of the response?
@helpothers67512 жыл бұрын
Hi Valentin, I am storing one response data in an environment variable, and the same data I need to compare in multiple API responses, please help me here.
@vdespa2 жыл бұрын
Did you manage to replicate the example I've shown in the video?
@helpothers67512 жыл бұрын
Some multi-array
@samroy48932 жыл бұрын
Hi Valentine, could you please help me that how can we compare two JSON responses in which values of the Keys are same in both responses but "Key" names are different....for an example key is "workId" in one response and in other response key is "id" , but both key having the same value "2342" and there are 250 key pair values that we have to compare.....hope you help me out..thank you.. really appreciated!!!!!
@cva11192 жыл бұрын
Hi, how can we compare both responses irrespective of order of the elements
@vdespa2 жыл бұрын
The test will still pass or fail. But if it fails, it will be hard to do a diff.
@michalisbelomatis30429 ай бұрын
@@vdespa You mean that we don't have to sort the JSON responses? If they are identical but not in the same order, the test will pass?
@ravinadhb92193 жыл бұрын
Hi Valentin very good explanation. I have a question here . How do we add extra Object to the response and send it as request body to another API Request
@vdespa3 жыл бұрын
You save it to a Postman variable and reuse it in the next request.
@markthomas96412 жыл бұрын
Thanks, good video. I use a tool called DeltaJSON to compare JSON responses from Postman API. It has an API that I can use from my code as well.
@vdespa2 жыл бұрын
Thanks for sharing!
@ranithomas30063 жыл бұрын
Very good explanation Valentin. Is there any solution to compare with request body values and response body values of the other request?
@vdespa3 жыл бұрын
You can write assertions using pm.request and pm.response to get the data you need.
@blasterino3 жыл бұрын
Hi Valentin, thank you very much for your videos they are very useful. As a tip to compare I use sublime text + filediffs plugin. I have a doubt, how would I delete a field if I don't have headers like args or data as your example json has. Thanks in advance
@vdespa3 жыл бұрын
Thanks for sharing! You can use the delete keyword on any property of an object.
@blasterino3 жыл бұрын
Thank for you qickly response
@Eswar1234eswar3 жыл бұрын
Thank you very much.
@vdespa3 жыл бұрын
You're welcome ☺️
@JC-ov8ko3 жыл бұрын
I use VS code to compare files locally so I am not exposing any important data. Also it color codes the differences.
@vdespa3 жыл бұрын
Thanks for the tip, good idea!
@ranimolthomas7173 жыл бұрын
Hi Valentin , It is very useful topic and Nice presentation. I faced one issue. can you please help me. While comparing two response body, am getting the error like Response must be like v1 | AssertionError: expected { Object (isChildExist, doNotRelease, ...) } to deeply equal [ Array(1) ] , even if the boolean values are same ( isChildExist & doNotRelease has boolean value). How can solve this issue. I used this - pm.expect(responsev2).to.eql(responsev1);
@vdespa3 жыл бұрын
It looks like you are comparing an object with an array.