API Testing using POSTMAN – Advance Test Cases

In this tutorial, We are going to write some TESTCASES in the POSTMAN Chrome as a part of API Testing.

API Testing includes

1. JSON Schema Validation
2. Response Time Verification
3. Verification of the Keys defined in response by API
4. Values as Expected (Data driven Testing) in response

Learn about JSON Schema – http://jsonschema.net


Code  – 
URL –  https://jsonplaceholder.typicode.com/posts/1

Test Code  –



12 thoughts on “API Testing using POSTMAN – Advance Test Cases”

  1. Thanks for the post.
    I was trying to use json schema.net but it does not seem to be generating the Json schema.
    Please help.


  2. Hello Promode,

    I am following your blog related to schema validation via postman but found that and trying to use in my own test
    Command on line#38 tests[“Valid schema”] = tv4.validate(jsonData, schema); will pass for all the time even if you make changes to schema.

    Please let me know if you have another way of validation schema.

  3. Hello,

    Nice Explanation. Im new to API testing, and I tried your examples.
    I tried writing test cases following your video, just small doubt .
    When I click on any snippet like – Response body:Contains String – I get this in the test case tab -pm.test(“Body matches string” , function () {

    And I have seen on your screen as – tests[“Content-Type is present”] = postman.getResponseHeader(“Content-Type”);

    Can you please explain me why I’m getting diferent . That would be helpful. Thanks

  4. how to test multiple API at a same time in postman like 100 API URL mention in json file or any other file then import in postman for testing.

  5. Hi Promode, thanks for reply. but i have one doubt. can we use collection runner or multiple instances of newman?? mean both gives same result or not?? if we try to test multiple API. I am new for API testing and also start using postman.


Leave a Comment

This site uses Akismet to reduce spam. Learn how your comment data is processed.