Skip to main content

What is API testing?


Today let’s talk about what is API testing, and what exactly do we test when we perform API testing?
To start from the very beginning lets understand what API is.

 What Is API?

API – Application Programming Interface.
This is a functional piece of a system that sits usually between a data source and a front end presentation to the user. In other words if we take a simple example of a web application the nice looking web site will be using API calls to retrieve data from the back-end database.
It is important to understand that API can mean different things in different systems, for example for web application an API can be a SOAP or a REST web service, but for a desktop application API can be a set of known functions that allow retrieve or modify data within that application.

 What Do We Test With API?

When we talk about API testing we talk about testing some specific functionality that is described in the requirements for that API, and our verification points might change drastically based on what required, but we can group our verifications for all APIs into 3 main categories:

  •         Verify that the expected data is received in response
  •         Verify that the expected action was performed
  •         Verify that additional APIs functions were triggered (nothing was performed yet but a job might have started to execute action in a future)
At this point we usually differentiate between a specific API testing and an End-To-End API testing.  
During the specific API testing we make sure that the API can be called in every possible way and that the proper results are being received or if not then a proper error is returned. For example if we have an API that return weather information for a specific city we will try if it can give information for several cities at once, no city at all, and a city that does not exist in addition to a proper city name.
During the End-to-End API testing we verify that a proper series of calls is trigged by calling some entry point API, so for example if we have online registration form submitted that should generate a temporary password and email that to customer, we will call a form submission API, that in turn expected to call a password generation API and both results will be passed over to an email generating API  

 What Tools We Use?

There is a lot of popular tools that are being used to test different types of APIs but this is beyond the scope of this article. What is important to mention at this point is the fact that we cannot test APIs without a proper tools or an environment setup. In difference to a GUI testing this type of testing requires a setup of a tool and an environment to access the component that is under test as direct access without special coding and tools is usually not possible


Comments

Popular posts from this blog

7 Most Popular Test Types in Software Testing

Today we are going to return back to basics of software testing and discuss the 7 most popular test types that are being used in every software testing effort. Those different test types cover all the levels of the software to make sure that the final result matching the expectations from every possible angle. Here is our list: Unit testingSmoke testingRegression testingFunctional testingIntegration testingUser Acceptance TestingPerformance Testing


Now let’s have a deeper dive into each one of those by using a simple example of an imaginary system that was created in order to manage warehouse activity including shipments, inventory and goods receptions from suppliers.
Unit Testing This type of testing is usually performed by the developers and is covering the very basic development component. In this test developers are testing the straight forward functionality of a functional piece of code to make sure that it is performing according to their expectations. In our example: This test w…

Story Points estimation for Scrum with Fibonacci vs Shirt Sizes vs Linear - 7 minute guide

It is all began long time ago when Development Teams were constantly asked to provide estimate and they were having a hard time to properly face the task. Let's admit it, there are so many things that can change, happen, and simply go wrong during the development process that one can hardly expect a proper estimation of hours for each task. That why a relative estimation with Story Points came along.

Story Points Estimation
Its a different way to estimate the effort of the Scrum Development Team with-in Agile methodology, which means that instead of estimating hours of work the team estimates each effort relatively to other efforts in the project.
Let's assume that a developer knows that specific 'Task 1' is much harder than another 'Task 2' it is hard for him/her to quantify that harder feeling in hours of additional work but it is possible to say that it much more work. This situation is being address by Story Points when each story point is representing som…

5 Steps to Install Robot Framework for Web Testing Automation - 7 minute Guide

Lately, I found myself helping several people to begin their automation testing journey. And what a better place to do it then a nice new installation of a Robot Framework with its Selenium2Library on a Windows OS.

Why Robot Framework with Selenium2Library? While you are probably here because you are looking for a quick installation guide for Automation Testing platform for you web project, I still need to do my do diligence and explain in couple of words why we need it.
Robot Framework it's a Python framework that allows for a less development oriented Manual QA professionals to do a quick switch into Test Automation. This can be achieved by allowing for easy English phrases (e.g. Click Element, Wait, etc) to replace a more complex Python syntax.
Selenium2Library it's additional add on on top of Robot Framework that allows easy interaction with web elements during the automation process.

That's it..... DONE with the talking now the installation....

Installation process Ro…