test types to test apis code example
Example 1: testing types in api
Unit testing and Functional testing
Load testing to test the performance under load
Discovery testing to list, create and
delete the number of calls documented in API
Usability and Reliability testing
to get consistent results
Security and Penetration testing
to validate all types of authentication
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
Example 2: what to test in api
Basicall we are checking response body
to verify if request matches with response.
After that we are writing SQL query
to double check if database matches.
We can say happy path if all pass