API testing -
Its a testing of an API which is a set of instructions which used to exchange the data in between two systems.
What is an API ?
Two systems or softwares use the API is used for communication and an exchange of information.
What is an API testing ?
API testing is basically done for the system which has number of API’s and meant to be used for data or information exchange.
Below things need to be taken into consideration for API testing -
- Testing the minimum and maximum values supported to make sure that test suite has variation in API request parameters that checks out functionality and the limitations or failures
- Combination of multiple parameters with some valid / invalid data to see the response
- Understanding the API responses under different external environment conditions such as file formats, hardware devices etc.
- In API Testing, we need a some software or an application to talk with an API. In order to test an API, some Testing Tool like Postman, Apigee is needed.
Set-up of API Test environment -
- Setting up an environment for API testing is bit difficult job as there is no GUI to use.
- Configuration of DB and Server should be done according to the application requirements.
- Types of Output of an API
- Any type of dat
- Status (say Pass or Fail)
- Call to another API function
What API’s majorly used for -
- Check the return Value based on input
- Check if nothing comes in the API response
- Check if output of the API triggers in some input to new API or APP
What to test for in API testing -
- API testing uncovers some of the ground in testing area :
- Usability testing:
- To ensure if the reliability and ease of connection. To verify friendliness when AP talks to another API or the app
- Security testing:
- To ensure security, authenticity and encryption of the sensitive data.
Types of Bugs that API testing detects -
- Unhandled conditions
- Low Response time
- Performance issues
- Security threats
- Missing error messages
- Incorrect responses
- Connection reliability issues
- Incorrect warning or error messages
Some of the API testing tools -
Challenges of API Testing -
- Combination of parameters, sequencing of parameters while execution
- Checking the response on various systems is a bit challenging
- Code understanding is required by the tester
API testing plays a vital role in order to make an application successful and ensure that it performs all the functionality for which it has been designed. If API does not function correctly, it may lead to flaws in the current application as well the calling application.