API Testing Overview
When you're new to API testing, it can seem like a very foreign concept. In reality, it is very similar to testing any application. We'll look at some general categories to cover, and what types of tests those might include.
Functionality
Functionality tests are of course a major part of any test plan. In API functionality testing we check for things like a correct Response, the correct Response Code, and Schema Validation. You'll want to validate these for each endpoint you're working with, as well as for each type of request available.
Security
For the most part, APIs are typically internal tools and you'll want to protect the data from being accessed by outsiders. While security testing APIs we check for authentication and authorization methods, unauthorized access, and injection attacks.
Performance
At the most basic level, performance testing an API involves checking that the response time in within limits. This can be further fleshed out while the API is undergoing load, stress, endurance, spike, or volume testing to uncover potential issues in peak times, and to ensure scalability.
Error Handling
In testing API error handling we check for graceful failures and useful error messages. You will submit requests with invalid or missing data to see how the call responds. You may also want to work with your developers to setup testing endpoints to trigger and validate error status codes such as server errors.
These are some high level suggestions to get you started with what to consider when testing an API. Depending on the scope of your needs, you may choose to ignore some of these in favour of more robust testing in other areas.




Comments
Post a Comment