API Testing...
API
An API (Application Programming Interface) is a collection of software functions and procedures called API calls, which can be executed by other software applications.
API testing
Initial condition in API testing to create a conditions under which API will be called like (Credit card info integrating, file upload integrating) etc, probably, API can be called directly or it can be called some event or in response of some exception.
Create test cases
for API testing:
Most of the test case should be based on the output.
·
Return
value based on the Input condition
Simply to test as input can be defined and results can be validated.
Example to write a test case for to submit the Credit card details in the submission of form (card name, number etc),then API return the results of your credentials are returned as xml format.
Another one int addvalue (int a, int b), you can pass different combinations of int a, int b can validate these against known results.
API testing
Approach
Step I: understand that API Testing is a testing activity that requires some coding and is usually beyond the scope of what developers are expected to do.
Step II: traditional testing techniques such as equivalence classes and boundary analysis are also applicable to API testing.
Step III: it is almost impossible to test all possible scenarios that are possible to use with your API. Hence focus on the most likely scenarios, by using different data types and size to maximize the test coverage.
API Testing
Technique
Apply this technique while in API testing
Soap Opera Testing: A technique for defining test scenarios by reasoning about dramatic and exaggerated usage scenarios.
Forced Error Testing: Nothing but mutation testing, it process of including error / changes to the application to find how application is working. The FET consists of negative test case that is designed to force a program into error conditions.

