API TESTING: WHAT? WHY? HOW?
If you are a tech-savvy person, you must have definitely heard of API. In fact, it is a common thing. You have probably been using it since 1990, copying and pasting a chunk of Microsoft Word to Excel Spreadsheet, for instance. However, the realm of Social media and ballooning number of web-based applications have revolutionized our world and the way we communicate making our life more and more Internet-dependent and calling for effective ways of interacting between various web-based solutions.
And these days APIs are especially handy and crucial because they help developers to create new apps which fit into social networks like Facebook or Instagram. For example, you are looking through Instagram photos and you want to see how these places look in real time, using Google Maps. Or you are watching a Youtube video and you want to share it via Facebook. API make this possible without you even noticing what lies behind .It works like invisible magic.
WHAT IS API?
API (Application Programming Interface) works as an interface between two separate software systems enabling them to interact with each other. Some of the internal code (limited amount) of the system is exposed to the world so that a program can communicate with other programs.
WHY TO TEST API?
Testing API is like testing any other interface into the software. You have to make sure that it is bug-free before shipping.
It resembles testing on the UI level but instead of just using data input and output, API tester makes calls to the API, receives output and puts down the actual result as opposed to the expected one. You can perform it using special test solutions (for instance, Postman) or as API testers frequently have to do, write API test code.
The purpose of API test code is to issue a request to the API, output and note down the expected, actual results, and the time within which the response was delivered.
HOW TO TEST API?
- If you want to find serious bugs while testing API, first of all, hone in on its ordinary-use. Check how it responds to calls under typical conditions because that is what it mainly has to do. If a failure occurs, it means that there is an important bug somewhere else, and it has to be detected and caught.
- Stress testing is used to see how API copes with unexpected or excessive outputs.
- Another important focus of testing is to see how the system reacts to failures. Does it show an error message? If yes, does the error message include all the data needed to locate and fix the bug preventing the system from running? Does it make other applications or the system lag? All these questions are to be answered by an API tester.
Para acceder a post original click aquí