Hello! can anyone explain IN DETAILS what is API???
thank you!
Answers were Sorted based on User's Feedback
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 |
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 |
Who assign Bug Id & Bug Version Id?
Tell me some Compatibility defects for web application?
what is the diffrence b/w QA and QC?
You have been given 2 projects to test, what are the key factors you consider when prioritizing you work load?
WHAt is diff between test plan and test planning?
What happens if we access a website that has cookies once the browser cookies are disabled?Does the website will be accessed?Though accessed, does the session will be tracked?
How to write test cases for Hotmail page?
can you tell me types of bug ?
1Testing process followed in your company … 3. Testing Methodology 4. Where u maintains the Repositories? 5. What is CVS? 6. Bug Tool used? 7. How will you prepare traceability matrix if there is no Business Doc and Functional Doc? 8. How will you validate the functionality of the Test cases, if there is no business requirement document or user requirement document as such… 9. Testing process followed in your company? 10. Tell me about CMM LEVEL -4 …what are steps that to be followed to achieve the CMM -IV standards? 11. What is Back End testing? 14. How will u write traceability matrix? 15. What is CVS and why it is used? 16. What will be specified in the Defect Report…? 17. What is Test summary Report…? 18. What is Test Closure report…? 21. What are the Testing methodologies that u have followed in your project ? 22. What kind of testing that u have been involved in and explain about it…. 24. What is joins and what are the different types of joins in SQL and explain the same? 25. What is Foreign Key in SQL…?
1.exactly when we go for regression testing?why? 2.what is compatibility testing?what defect u found while testing give example? 3.how many test cases you write and execute per day?
What are the diffrent testable item in web testing,database testing?
An employee has £4000 of salary tax free. The next £1500 is taxed at 10% The next £28000 is taxed at 22% Any further amount is taxed at 40% Which of these groups of numbers would fall into the same equivalence class? a) £4800; £14000; £28000 b) £5200; £5500; £28000 c) £28001; £32000; £35000 d) £5800; £28000; £32000 Can you please explain in brief, how to do equivalance class?
4 Answers ISTQB, Tech Mahindra,