Вы находитесь на странице: 1из 2

sign up log in tour help

Software Quality Assurance & Testing Here's how it works:
Stack Exchange is a question and
answer site for software quality control
experts, automation engineers, and
software testers. Join them; it only takes
a minute: Anybody can ask Anybody can The best answers are voted
a question answer up and rise to the top
Sign up

How do you perform API Testing? I had an interview question

I had an interview and they asked me how you will perform API testing? What should be my perfect answer? I explained what ever I have
experienced with API testing but I felt that they were not satisfied with my answer.

I have answered as follow :

Generally I test following things while do API Testing :

1. Data accuracy
2. Data Validations
3. Error codes if API returns

I told that I use SOAP UI to test API.

I would like to know perfect answer for this question and please suggest other tool as well which help me to do API testing.

interview soapui api-testing

asked Dec 11 '15 at 5:23

Helping Hands
1,642 1 8 35

1 API testing is the law hanging fruit of test automation. Unless the team are expert in 'doing it wrong' their ideal
answer should be 'not manually' Nathan Cooper Dec 21 '15 at 22:47

2 Answers

Well, an API is such a loaded term. It can be REST, SOAP, RMI, or native C++ library API,
etc., so the tooling will depend on that. Particular test scenarios will depend on that as well. For
instance, for REST or SOAP over HTTP you may want to check popular HTTP-related attacks
like HTTP Response Splitting, etc. You may also check if API is well-defined, e.g. in case of
REST it is RESTful.

Next thing is that you may test API in isolated, small scenarios, where you check expected
responses for valid and invalid inputs. This may go two ways, either through equivalence class
partitioning and boundary checks, or with fuzz testing.

Finally, API is just an interface to a system or a library living in a certain context: it may have
different states and may be just a part of different flows. So I would verify that as well.

I already mentioned some security tests, but there's a whole set of other non-functional tests
you can run against API, performance tests included.

answered Dec 11 '15 at 6:55

4,358 2 15 41

Thanks. I was looking for something like this. Helping Hands Dec 11 '15 at 10:17

In general your answers were valid. But to create a better impression you could communicate
the points which show you have deeper understanding of APIs and API testing.
You can mention about web services, APIs REST, SOAP, WSDL, XML, JSON, different
methods (POST, GET, DELETE) etc so they get the perception that you have technical
understanding of these technologies
It will be good to share if you have any prior experience of testing APIs. How you did test
designing/documentation for them. Which tools (manual/automated both) you used. why &

We can test following factors in APIs

data, data type, data order, data completeness

authorization checks
http status codes
response time out implementation
security and performance testing

For further tips: https://mathieu.fenniak.net/the-api-checklist/

answered Dec 11 '15 at 10:16

623 1 10

Yes you are right , Actually my answers were correct but limited. Thanks for your answer. Helping Hands Dec 11
'15 at 10:18

You are welcome. TestingWithArif Dec 11 '15 at 18:27

The list under the link is awesome, could you summarize it's content here? dzieciou Dec 11 '15 at 19:09