Hello! can anyone explain IN DETAILS what is API???
thank you!

Answers were Sorted based on User's Feedback



Hello! can anyone explain IN DETAILS what is API??? thank you!..

Answer / anant

Before dwelling into the subject of API Testing, we should
understand what is the meaning of API or, Application
Programming Interface.

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

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. It is very easy to setup initial condition in
GUI, In most cases you can find out in a glance whether
system is ready or not. In case of API this is not the
case, 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.

Output of API could be some data or status or it can just
wait for some other call to complete in a-synchronized
environment. Most of the test cases of API will be based on
the output, if API

Return value based on input condition

This are relatively simple to test as input can be defined
and results can be validated against expected return value.
For 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

For cases like these you will probably have some mechanism
to check behavior of API on the system. For example, if you
need to write test cases for delete(ListElement) function
you will probably validate size of the list, absence of
list element in the list.

Trigger some other API/event/interrupt

If API is triggering some event or raising some interrupt,
then you need to listen for those events and interrupt
listener. Your test suite should call appropriate API and
asserts 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 be validated. If
you have other means of accessing the data structure, it
should be used to validate that data structure is updated.

Modify certain resources

If API call is modifying some resources, for example
updating some database, changing registry, killing some
process etc, then it should be validated by accessing those
resources.

You should not get confused with API Testing and Unit
Testing. API testing is not Unit testing. Unit testing is
owned by dev team and API by QE team. API is mostly black
box testing where as unit testing is essentially white box
testing. Unit test cases are typically designed by the
developers and there scope is limited to the unit under
test. In API testing, test cases are designed by the QE
team and there scope is not limited to any specific unit,
but it normally cover complete system.

Main Challenges of API Testing can be divided into
following categories.

Parameter Selection
Parameter combination
Call sequencing

Is This Answer Correct ?    3 Yes 0 No

Hello! can anyone explain IN DETAILS what is API??? thank you!..

Answer / abdul sameer

A formalized set of software calls and routines that can be
referenced by an application program in order to access
supporting system or network services.

Is This Answer Correct ?    1 Yes 2 No

Post New Answer

More Manual Testing Interview Questions

i have faced this question in one interview.kindly let me know if u know the ans . the ques is the tester have been found 20 bugs in the requirement .after dev. has been fixed 20 bugs again tester retest the bugs he found again 12 bugs dev .fixed 12 bugs keep on its going ..finally its comes zero defects now how will u checking the application stability ..

5 Answers   TCS,


What are the methods you followed, while doing black box testing???

7 Answers   Oracle,


What are microsoft 6 rules?

0 Answers  


Hi, i want any refernce in the YODLEE. i heard that there is opening for the manual testing. Please reply soon at nidhi.pal24@hotmail.com

1 Answers  


What is the difference between Project Based Testing and Product Based Testing?

4 Answers   Scandent,






How GUI testing will be done in manual testing for a website?

6 Answers  


Just now i got a bug in the application.Anyone of u can clarify me is it a bug or not. scenario is: 1. if we a check box more than one. 2. click TAB and keep the focus on any check box not on the last check box 3. Then click (space+tab) at a time 4. then check the changes if we click anywhere the previous check box is going to be checked and the application is going to be hanged........... please answer to this question.If i have reported this to my developers they are telling that this is a browser property please confirm this scenario at ur developers and answer to me please .thanks in advance........ (glamorous)

2 Answers  


They showed me a Web page containing 3 text boxes labeled as Name, D.O.B & Blood Group.It also have 3 Buttons as OK, CANCEL,Reset. They told me that 1) when you click on OK it'll route you to the next page and save the data in the database. 2) When you click on CANCEL it'll route you to the previous page. 3) When you click on Reset it'll clears all the entries made by you. Now they asked me to write Test cases to test the functionality of that web page & asked me to write 1 critical test case after which they will give final go ahead to test the rest of the application... I wasn't able to write the critical test case. Plz answer.

5 Answers  


Bank a/c no. 0-499, 500-1000 or only 2000 what will be valid partitions (ECP) ?

1 Answers  


Hi Friends... Can any one tell me how many functional test cases we can write for basic login page.. Thanx in advance..

5 Answers  


Why V model is callds as V model? And at which stage v & V happens?

2 Answers   Kanbay,


I am DD. I am working as a Tester in e-learning company? IS there scope for content testing? or i have to change to software testing. pls guide me...

0 Answers   Wipro,


Categories