What is an API?
It stands for application programming interface. It enables two applications to communicate with each other.
It consists of subroutine definitions, logs and tools for creating application software.
Examples include: Amazon advertising API, Twitter API, You tube API etc
What are the main differences between API and web service?
- All web services are APIs but all APIs are not web services.
- Web services cannot perform all the tasks performed by an API and may not contain all the specifications of an API.
- Web services use only three styles like SOAP, REST and XML-RPC for communication whereas API uses all multiple ways.
- Web service always requires a network to operate while API doesn’t require Network for operation.
- What are the limits of API usage?
Many APIs will have the limit set by the provider. Thus by estimating the usage and understand how that will impact the overall cost of the offering. Whether this will be a problem depends on how data is leveraged.
What are some of the architectural styles for creating a web API?
- HTTP for client server communications.
- XML/JSON for formatting language.
- Simple URI for the address of the services.
- Stateless communications.
What is API Testing?
It is the software testing that determines if the developed APIs meet expectations regarding the functionality, reliability, performance and security of the application.
What are the advantages of API testing?
- Test for core functionality: the core and the code level functionalities will be tested before GUI tests.
- Time effective: it takes less time compared to GUI tests. API tests have faster test coverage that results in less cost.
- Language independent: In API data is exchanged using XML or JSON these transfer modes are completely language independent.
- Easy integration with GUI: API enables high integration tests that are useful if you want to perform functional GUI tests before API testing.
- What is test environment of API?
- The Test environment of API requires the configuration of the database and server, depending on the software requirements.
- When the installation process is complete, API is verified for the proper operation. Throughout the process the API called from the original environment is set up with different parameters to study the test results.
What are the Common API testing types?
- Validation testing
- Functional testing
- UI testing
- Load testing
- Error detection
- Security testing
- Penetration testing
- Fuzz testing
- Interoperability and WS compliance testing
What is the procedure to perform API testing?
- What is the procedure to perform API testing?
- Choose the suite to add the test case.
- Choose the test development mode
- Demand the development of test cases for the required API methods.
- Configure the control parameters of the application and then test conditions.
- Configure method validation.
- Execute the API test.
- Check test reports and filter API test cases
- Arrange all API test cases.
What Must be checked when performing API testing?
- A request is raised to the API with the known data this way you can analyze the validation response.
- Accuracy of data.
- Schema validation.
- Http status codes.
- Data type, order, validation and completeness.
- Authorization checks
- Implementation of response timeout
- Error codes in case API returns
- Non functional testing like security and performance.
What is the best approach method to perform API testing?
- Defining the correct input parameters.
- Verifying the calls of two or more added value parameters.
- Defining the basic functionality and scope of the API program.
- Writing appropriate API test cases and making use of testing techniques such as equivalence class, boundary value etc.
- Testing case execution.
- Comparing the test result with the expected result.
- Verifying the API behavior under conditions such as connection to files and so on.
What are the tools that could be used for API testing?
What are the tools that could be used for API testing?
- Katalon studio
- Postman
- SoapUi pro
- Tricentis Tosca
- Apigee etc
What are the difference between API and Unit Testing?
API Testing | Unit Testing |
Conducted by QA team | Conducted by the development team |
Mostly black box testing | Mostly white box testing |
Aimed to assess the full functionality of the system for it will be employed by the end user | Used to verify whether each unit in isolation performs as expected or not. |
Often run after the build is ready and authors do not have access to the source code | Each of the code modules must be ensured to pass the unit test before being built by the developers. |
API enables communication between two separate software systems. A software system implementing an API contains functions or subroutines that can be executed by another software system.
While UI testing refers to graphical interface testing such as how users interact with the applications, application elements such as fonts, images, layouts etc. It deals with the look and feel of the application.
What are the major challenges faced in API testing?
- Parameter selection
- Parameter combination
- Call sequencing
- Output verification and validation
- Providing input value as GUI is not available in this case.
What are the testing methods that come under API testing?
- Unit testing and functional testing
- Load testing
- Discovery testing to list, create and delete the number of calls documented in API
- Usability and reliability testing
- Security and penetration testing
- Automation testing to create and run scripts that require regular API calls.
- End to end integration and web UI testing
- API documentation testing to determine its efficiency and effectiveness
What are the common API errors?
- Missing module errors
- Documentation errors
- Parameter validation errors
- Standard error expectation. There can be one or more warnings within an individual module.
What are the types of bugs found in API testing?
- Missing or duplicate functionality
- Fails to handle error conditions gracefully
- Stress
- Reliability
- Security
- Unused flags
- Not implemented errors
- Inconsistent error handling
- Performance
- Multi threaded issues
- Improper errors
What are the common protocols used in API testing
- JMS
- REST
- HTTP
- UDDI
- SOAP
Why API testing is considered as most suitable form of automation testing
- It verifies all the functional paths
- It provides the most suitable interface
- It is easier to maintain and provides fast feedback.