How do I start to test an API?

Hi everyone! I’m a newly graduated software tester, and I’m currently learning how to test APIs.
The thing is that the company has only developed the API and does not have a product manager or any senior to brief me on what should be done. I do not know exactly where to start and what to test. They just told me to find whatever bugs there are and report them. It is an AI driven tool, still incomplete and in the making.
Anything would be helpful at the moment. Thank you

4 Likes

HI @ilmi,

Welcome to Ministry of Testing.

It sounds like quite the challenge you have there. Yet perhaps an exciting opportunity to dive deep into API testing to hone your skills.

You might be interested in this collection. Lots of good stuff from the community:

And the following courses:

Good luck and we’ll see you around the community.
Simon

2 Likes

Hi there @ilmi!
What would you test if instead of API you had an app (let’s say a web app) that uses the given API to get, update, change, display, etc info for users?

2 Likes

I would suggest starting with the API Documentation might be beneficial, there must be some kind of documentation from the developer side in which the sample request and response might be present. If there are such documents available then it will be really helpful else you have to coordinate with PM, go through Figma and requirements, and decide the expected result of the API.

If you are looking to execute API’s manually on tools like Postman or Swagger, it won’t be very difficult as you have to send a request and observe the response, and in response you have to verify data.

If you are looking for automation-based API testing then it will be a bit difficult as you may have to create a framework from scratch.

Also, there are a few terms that you must be familiar with before starting API testing - like API Error code, Authentication, Authorization, Tokens, Header, path params, query params, etc.

Some of the resources of MOT are already shared above, in case you are looking for additional resources then you may refer to YouTube or Udemy, there are a lot of free or paid resources for the beginner level.

2 Likes

Keep in mind that an API is, similar to a GUI, an entry point to a complex system.
You don’t just send and receive data, but also (can) trigger longer running processes. Business logic on the server.

E.g. at a calculator making “1+2=3” can be done by 4 POST calls (1,+,2,=). While the first 3 should work on their own (return code, error handling, etc.), its very important to explore what happens when you try the 4. (=). Which should normally trigger the calculation and returns 3 as result (either in the response or with a GET request). Try to think about potential problems here.

1 Like

Congratulations on your Graduation :clap: and welcome friend. Great question! Have you had a kick off or handover from the developers/engineers?

1 Like

I’m curious, what have you graduated in? How long took the education?

1 Like

Thank you Simon, great to be here :smiley: .

Appreciate the link, I will check them.

1 Like

I’d want to test that the app works well with the API, handles user interactions smoothly, displays the right info, and stays secure. I’d also need to check how it performs under different conditions, works across different browsers and devices, and ensure there aren’t any issues after updates?

1 Like

Thank you very much for the details, appreciate it!

1 Like

Thank you very much. Unfortunately I have not gotten any form of handover from the devs.

1 Like

Got it, that’s a good way to think about it. It’s not just about testing each request but also making sure they work well together. t’s all about making sure the steps make sense together. Thanks

2 Likes

Well I finished specifically for Software testing. Had 2 year intensive academic lecturing, was able to attend a couple of Manual and Automation hackathons which helped a lot.

2 Likes

Then do the same with API but instead of using and checking Client-side UI (mobile/desktop/web app) use Postman, Curl, etc as a client and you don’t need to test UI, you only need to test requests/responses, data (probably in JSON format), headers, response codes, etc. You would test all that if you have a complete product (an app), but now the scope is smaller because you don’t need to test the user interface. As you’re a newly graduated software tester, I assume you generally know how to test software. You’re asking about the testing approach so basically, it is the same as usual. API provides some features for users, it’s a source of data, and each endpoint has a particular purpose - it’s a feature or part of a feature so test that they don’t have any bugs and they work as expected. You can easily determine the importance of almost every endpoint (groups of endpoints) in the future system if you understand what your team is trying to build.

1 Like