what is a api testing/



what is a api testing/..

Answer / raj

API TESTING

What is API?

An API (Application Programming Interface) is a collection
of software functions and procedures called API calls, that
can be executed by other software applications.

What is API Testing?

API testing is mostly used for the system which has
collection of API that needs to be tested. The system could
be system software, application software or libraries.API
testing is different from other testing types as GUI is
rarely involved in API Testing. Even if GUI is not involved
in API testing, you still need to setup initial environment,
invoke API with required set of parameters and then finally
analyze the result. Setting initial environment become
complex because GUI is not involved. In case of API, you
need to have some way to make sure that system is ready for
testing. This can be divided further in test environment
setup and application setup. Things like database should be
configured, server should be started are related to test
environment setup. On the other hand object should be
created before calling non static member of the class falls
under application specific setup. Initial condition in API
testing also involves creating conditions under which API
will be called. Probably, API can be called directly or it
can be called because of some event or in response of some
exception.
Test Cases for API Testing:
The test cases on API testing are based on the output.
•Return value based on input condition
Relatively simple to test as input can be defined and
results can be validated. Example: It is very easy to write
test cases for int add(int a, int b) kind of API. You can
pass different combinations of int a and int b and can
validate these against known results.
•Does not return anything
Behavior of API on the system to be checked when there is
no return value.
Example: A test case to delete(ListElement) function will
probably require to validate size of the list or absence of
list element in the list.
•Trigger some other API/event/interrupt
The output of an API if triggers some event or raises some
interrupt, then thoseevents and interrupt listeners should
be tracked. The test suite should callappropriate API and
declarations should be on the interrupts and listener.
•Update data structure
This category is also similar to the API category which
does not return anything.Updating data structure will have
some effect on the system and that should bevalidated.
•Modify certain resources
If API call is modifies some resources, for example makes
update on some database,changes registry, kills some
processes etc, then it should be validated by accessingthe
respective resources

Is This Answer Correct ?    2 Yes 0 No

Post New Answer

More Manual Testing Interview Questions

Why testers wil prepare useracceptance testcases,system testcases and integration testcases,What is the differenece between all this test cases

0 Answers  


What is the difference between GUI testing and black box testing

4 Answers  


hi there, Yaar can any body help me please? I am looking for job change n want to relocate to Pune,Im in bangalore I have 2+exp in testing (man&QTP). if anyone can provide some reference in any comp.....plz reply ....Thanks

1 Answers  


Hi all, Can u pls help me with some Testing mannual for Test case preparation, Test planning and for attending ISTQB Examination. Kindly provide your feedback in this mail id (gbijesh@gmail.com) Tnks & Rgds Bijesh G

1 Answers  


negative test cases on banking domain ?

0 Answers  


what is test frame work?

1 Answers  


What is end-to-end testing when we will do that testing?

10 Answers  


How will you go with testing process if only project requirements document is given to you

4 Answers  


As a tester, what is the final report u submitted to ur customer? please write it in tabular form?

1 Answers   CybAge,


what are the general problems in web testing?

2 Answers   Verizon,


when you carry on test design?

5 Answers   CTS,


CGI MANUAL TESTING INTERVIEW questions: 1. tell me about your self 2. could you please explain bi-directional traceability 3. Tracebulity matrix with example 4. What and diff between validation & verification activities 5. Possible ways to check the log-in screen page get locked (user acc should b same all ways) 6. log in screen for a job portal for user and new registration user screen and give some new requirement changes 7. What is maintainace testing and support-testing 8. What the real time scenarios you are using your system 9. what are the techniques used for test coverage 10. what are the methods used for manual testing to write test case 11 is any domain you would like to prefer 12 have you been a part of end-to end testing (system testing) 13. What is non-functional testing?

3 Answers   CGI,


Categories