2

Can someone tell me the basic test cases for testing an API with Postman?

  • Which test cases are commonly applied in API Testing.

Note: I am a beginner and I don't know where to start.

2

Well it is an era of API Testing, Rest APIs in particular. I would recommend you to know the basics of Restful before you proceed to testing of different sorts.

Some basics that you need to learn before you plunge into Rest API testing:

  • Basic restful Architecture and how it functions.
  • HTTP methods like POST, PUT and others along with their meaning
  • HTTP response codes like 200, 400 and others along with their implication.
  • Basic JSON structure and how to validate it

Once you're done with the aforementioned, you can pretty much apply your testing skills to test out APIs using any tool. Postman is a good one to start, Thanks!

  • I have learned about the Rest API and its method Post,Put,Get and Delete. I have find following thing in ApI for testing. • Json response 200 ok • Content type header • Api authentication • GET,Post and put Note:Please check the above mention test it is right or not? – Ikram Siddiqui Jan 26 '18 at 5:35
  • Good for a start. Please test the api with testcases like with a valid token/invalid token. Invalid JSON in request, wrong URI, trying to create duplicate data and other test cases, Thanks! – Rohan Kalia Jan 30 '18 at 5:35
0

Postman is one of the most easy to use tools that you can use for both manual and automated testing of RESTful API's. A sample test case for Postman would be as simple as having to hit a uri endpoint, fetching the results and asserting that the response code received is of HTTP 200.

You can go on with complexities like asserting the JSON/HTML/XML responses and integrate it with Jenkins for CI purposes.

I have experience of using Postman to build a completely CI automated API Test Framework using Postman, Postman BDD assertion library, Jenkins.

I have covered the basic part of using Postman in the first part here.

0

With Postman, you can create different kinds of HTTP requests such as GET, POST, PUT, PATCH and DELETE. It also provides supports for adding headers in the requests. It’s a very convenient API tool with very useful features.

As, Postman is very fast in response and also light weight that puts no impact on browser performance. Tests can be created with verification for certain conditions on the response.

Check out this step by step process to perform API testing through Postman:

  • First, install ‘POSTMAN’ add on in Google Chrome.

  • Open Postman.

  • Click on ‘Create New Collection’ button, fill details and Click ‘Create’ button.

  • Now go to newly created Collection and then Create

Read detailed process in this blog: How to perform Automation Testing of APIs using Postman?

  • 1
    This doesn't really answer the OP's question. They are asking for help with starting test cases, not what they can do with Postman. Please edit your answer to give an overview of the simpler starting test cases that are described in the blog post. – Kate Paulk May 18 '18 at 11:54
0

Postman is a tool that I use to test API calls before I put them into my code base. This is because I want to see what error messages and status codes the call itself causes. Once the API call is working as intended then I will put it into my code.

Basically, I want to make sure the API call is correct before I put it into the code base. This one foot in front of the other approach eliminates the guesswork of trying to figure out if the call itself was wrong or if my implementation of it into the code base caused an issue.

Postman also will provide meaningful feedback that sometimes gets gobbled up when you make an API call through a program.

-1

Instead of using Postman I recommend you to use JMeter. It is a powerful tool for API/functional testing too.

Since you are testing APIs, you need to consider the server side validation along with other business logic.

For more information, Please elaborate your requirements in question description.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.