What is API Test? Are there any special testing techniques applied for?

You might know API test for web service (REST, SOAP), but it’s just a type of API test. This article will tell you more information about API, types of API and API test.

What is API?

API stands for Application Programming Interface. API provides the interface or protocol to communicate between 2 modules or layers. It is a collection of methods for developing applications.

An API could be considered as a black box for developers using it. Thus, developers do not care about what occurs inside an API. They just care about what they should provide for API and what API response the result.

The information for an API is input parameters, and the response is output.

API could be applied for operating system, database, software library, hardware functions, and web applications.

There are some typical types of API familiar for testers, like:

  • Web service
  • Java API (library/dependency)

What is API test? Are there any special testing techniques applied?

An API is like a black box, so API test is to verify the output which is returned after passing input parameters to API. Tester plays the role as developer to use it and even more verify its working.

Testing techniques for API test are generally not much different compared with functional test. We still using basic techniques, such as:

  • Boundary values.
  • Equivalent partition.
  • Decision tables.
  • State transitions.

The special thing in API test is how to use and implement those techniques. Because API test is not GUI test, we should use properly tools and sometimes tester must writing code or script for testing.

An API is itself a completed unit of software applications, so API test could be a part of Unit testing. However, API test is only executed after the build or deployment ready.

For agile development, API test takes effects faster and more stable than GUI functional test. It is usually executed automatiically right after a build version ready. However, the costs and speed for implement the test cases (using tools or writing code) are concerned that need to be balance with application release plan.

Summary, API is the term of not only web service, software application but also hardware functions. API testing techniques are not separated with usual functional testing techniques, because one of the main purpose of API test is for checking function work well. The others approaches of API test could be to measure performance, security of API.

Reference:

https://www.vectorcast.com/testing-solutions/api-testing