API Interview Questions Flashcards
What is an API
(Application Programming Interface)
A software intermediary that enables two applications to communicate with each other. It comprises a number of subroutine definitions, logs, and tools for creating application software.
What are the main differences between API and Web Service
- All web services are APIs but not all APIs are Web services
- Web services cannot perform all the tasks that APIs would perform
- Web service uses only three stles: SOAP, REST and XML-RPC while and API may be exposed to in multiple ways.
- Web service always needs a network to operate while APIs don’t need a network for operation.
What are the Limits of API Usage
Limitations can be set up by the provider. This, try to estimate your usage and understand how that will impact the overall cost of the offering.
What are some architectural styles for creating a Web API
- HTTP for client-server communication
- xml/json as formatting language
- Simple Uri as the address for the services
- stateless communication
Who can use a Web API
Can be consumed by any clients which support HTTP verbs such as GET, PUT, DELETE, POST. Since Web API services do not require configuration, the can be easily used by any client.
What is API testing
kind of software testing that determines if the developed APIs meet expectations regarding the functionality, reliabilitym performance and security of the application.
What are advantages of API Testing
- Test for Core Functionality
- Time effective
- Language-independent
- Easy integration with GUI
What is an API test for core functionality
The core and code-level of functionalities of the application will be tested and evaluated early before the GUI tests. This will help detect the minor issues which can become bigger during the GUI testing
What is an API test for Time Effective
How quickly can the process respond and how much workload it can handle
What is an API test for Language-Indepenpendent
Data is exchanged using XML or JSON. These transfer modes are completely language-independent.
What is an API test for Easy Integration with GUI
and example would be a simple integration would allow new user account to be created within the application before a GUI test started
What are some common protocols used in API testing
JMS, REST, HTTP, UDDI and SOAP
What is the test environment of API?
Requires the configuration of the database and server. The api is then called from the orfiginal environment with different parameters to study the test results
What are principles of an API test design
- Setup: create objects, start services, initialize data, etc
- Execution: ssteps to apply API or the scenario, including logging
- Verification: to evaluate the result of the execution
- Reporting: Pass, failed or blocked
- Clean up: Pre-test state
What are common API testing types
- Validation Testing
- Functional Testing
- UI testing
- load testing
- runtime/ error Detection
- Security testing
- penetration testing
- fuzz testing
- interoperability and WS compliance testing
What is API documentation
The API documentation is a complete, accurate technical writing giving instructions on how to effectively use and integrate with an API. It is a compact reference manual that has all the information needed to work with the API, and helps you answer all the API testing questions with details on functions, classes, return types, arguments, and also examples and tutorials