Most Common Web API Testing Interview Questions and Answers
Most Common Web API Testing Interview Questions and Answers
Answers
Here we go.
This form of testing includes interaction between various or says multiple APIs as well as
the interaction between API and application program. The procedure mainly includes
making API calls using software and observing system response after receiving output.
Let us see some common test examples, where this form of testing is used to
verify:
Any data structure updated by API which requires proper validation.
Input condition based return values.
Call to another API or if any other event is triggered or some interruption is
raised.
The return values which can also be null or wrong results.
Modification of some resources like an update of the database, process killing,
etc.
Q #3) What is API test environment?
Setting up a test environment of API is a complex method where the configuration of the
server and database is done as per the requirement of the software application.
Graphical user interface (GUI) is not available in this form of testing.
After installation, API is checked for its proper functioning. In this process initial
environment that invokes API is being set up with a defined set of parameters so that
test results can be examined.
SOAPUI
Runscope
LOADUI
Automated API testing
Curl
There are few more others than these listed above tools which are used for API testing.
Q #8) What are the tools used for API test automation?
Automation testing is a must when we talk about agile development in API testing.
However, the language in which the code is written is also an important factor as it
decides the tool language.
‘Config’ file purpose is to describe and enlist every configurable component within a test
run.
When we go through any such documents, it must consist of a proper plan, content
source, proper layout or sketch for delivery, information related to each function, etc.
Function description
Sequence, syntax, and elements required for each parameter.
Syntax and type of error message that can occur.
Links related to functions.
Q #11) Name some most used templates for API documentation.
Enlisted below are some free templates which makes API documentation much easier
and simple:
Slate
FlatDoc
Swagger
API blueprint
RestDoc
Miredot
Web service API Specification.
Q #12) Enlist some of the API examples which are very well known and popular.
There are several such examples, enlisted below are some most popular ones:
Google Maps API: These are designed mainly for mobile and desktop use with
the help of flash interface and JavaScript.
Amazon Advertising API: Amazon is known for their products and thus their
advertising API accesses their product to discover their functionality and thus
advertise accordingly.
Twitter: The API for twitter is usually in two categories, one for accessing data
and the other for interacting with twitter search.
YouTube: This API used for YouTube includes various functionalities including
videos, live streaming, player, etc.
Q #13) What are the testing methods that come under API testing?
API testing generally involves following testing methods:
Unit testing and Functional testing
Load testing for testing the performance under load.
Discovery testing for listing, creating and deleting the number of calls that has
been documented in API.
Usability testing and Reliability testing for obtaining consistent results.
Security testing and Penetration testing for validating all types of authentication.
Automation testing for creating and executing scripts that require API calls
execution regularly.
End to end Integration testing and Web UI testing.
API documentation testing for determining its efficiency and effectiveness.
Q #14) Differentiate API testing and Unit Testing.
The difference between API testing and Unit testing can be understood from the below
table:
Unit testing is usually performed by developers where API testing is performed by the testers for end to end
every functionality is tested separately. testing of the functionality.
As they have the limited scope of testing, thus basic As they have the broader scope of testing, all issues
functionalities are only considered for testing. that are functional are considered for testing.
Usually, unit testing is done before the code is API testing is performed after the build is ready for
included in the build. testing.
The Source code is involved in this form of testing. Source code is not involved in this form of testing.
Q #15) What all challenges are included under API testing?
Challenges are the part of every form of testing and the same goes with API testing too.
Mentioned below are some common challenges that are faced in API testing:
The first and foremost challenge is selecting an appropriate parameter and then
its combination.
Parameter categorization
Proper sequencing of call is required as this may lead to inadequate coverage in
testing.
Output verification and validation
Another important challenge is providing input values, which is very difficult as
GUI is not available in this case.
Q #16) What are the types of Issues observed while performing API testing?
When testing is performed, then there have to be issues associated with them. Issues
observed while performing this form of testing are not new or much different but they are
common in this category.