Subscribe by Email


Saturday, December 31, 2011

What is application programming interface testing?

An application programming interface or API as it is known by its abbreviated form can be defined as a specification based on source code. Typically application programming interface is intended to be used as an interface in the software components in order to communicate with each other. An application programming interface includes specifications and requirements basically for required data structures, routines, variables, and object classes.

The requirements and specifications of application programming interface can take many forms such as POSIX which is an international standard or Microsoft windows API which is vendor documentation or standard template library or STL (in java AP or C++) which is the library of the programming languages.

Application programming interface and application binary interface are in great contrast to each other. The basic difference is that the application programming interface is based on source whereas the application binary interface is a binary interface. The best example is given by POSIX and Linux standard base. The POSIX is an application programming interface, whereas the Linux standard base in an application binary interface.

An application programming interface has got any features.
- It is language dependent. It means that the application programming interfaces is only available by using the elements and syntax of a particular programming language. This feature makes the application programming interface more easy and convenient to use.

- An application programming interface can also be independent of language. This feature helps in calling the application programming interface from several programming languages. This is the most desirable feature for an application programming interface that is service oriented. Such an API is not bound to specific system or process. It may be provided as a web service or remote procedure calls.

- Sometimes the term “application programming interface” is used to refer to a complete programming interface, a set of APIs that have been provided by an organization or a single function. Therefore, the scope of the meaning of an API is usually determined according to its usage.

- In some cases an application programming testing may describe the way in which a task is performed. An action is usually meditated by a function call in procedural programming languages like C. hence; here API usually describes all the functions and routines provided.

- Other times the application programming interface can be interpreted as a collection of the files included by the C language and its readable descriptions.

- There are various programs development environments that provide the documentations associated with an application programming interface in digital format. Example of such language is Perl which comes with a tool perldoc.

When it comes to object oriented languages, application programming interface provides a description of definitions and behaviors associated with a set of class.

- An application programming interface generally prescribes the methods using which one can interact or handle the class derived objects.
- An application programming interface is closely related to a software library.
- Library is the actual implementation of the rules that are set by the application programming interface.
- Like other this API factor also needs to be tested. For this, API testing is employed.
- API testing is somewhat different from other types testing since GUI is rarely involved in it. for API testing, one needs to set up the testing environment and invoke the API with its respective parameters and then analyze the result.
- The problems come while setting up the environment as the GUI is not involved. For cases that don’t return anything one needs to have some mechanism to check the API’s behavior.

There are 3 main challenges faced by API testing:
- Parameter combination
- Parameter selection
- Call sequence


No comments:

Facebook activity