30 Days of API Testing - Day 1: Define API testing


(duncs) #44

Here we go then…

"API testing is exploring the behaviour of Application Programmable Interfaces which send & receive messages with the endpoints of other components such as in the UI or DB layers. API testing checks that expectations are met & unexpected behaviour is uncovered.

API Testing is not only functional - it is possible to perform security, load & error handling tests through the API."


(Tu Anh Nguyen - KMS) #45

API stands for Application Programming Interface. Basically, an API indicates how software components should interact.
So API testing is a type of software testing the application programming interfaces (APIs) directly and as part of integration testing to determine if they meet expectations for functionality, reliability, performance, and security. (refers to wiki: API_testing)

=> It covers both functional and nonfunctional aspects.

API Testing requires an application to interact with API. In order to test an API, we will need to:

  • Use Testing Tool to drive the API
  • Write your own code to test the API

(Thao) #46

In order to verify functionality, performance, security … we use integration testing and API is a part of this. The API is an acronym for Application Programming Interface. We need to use software to send calls to the API, get output, and note down the system’s response.

api_testing


(Trang Ta) #47

I engage in researching 30 Days of API Testing. After self studying, I understand API testing is :

API Testing is Application Programming Interface testing. API is the bridge between client and server. Client is computer, mobile using difference operations that written by difference languages. Servers back-end also are written by difference languages. To understand together, they must talk the same language. It is API. API testing is performed at the business layer . An API receives request from client and tells the systems what to do and then returns the response back to client. The API data is from XML or JSON through HTTP requests and responses. It helps to find bugs without UI, so the cost reduces


(Thanh) #48

API testing is a type of software testing, it’s used to test the APIs. API is Application Programming Interface, it communicates and exchanges between software systems. Therefore, although it’s named contain Interface, to test APIs it’s not really related to feeling and appearance, it needs testing tools, coding skill to write the script for testing.

The output of API could be: type of data (string, integer numbers, …), status (number as 200, 4xx, 5xx), call to another API.

Testers perform API testing because it differs Unit testing, API testing is End to end functionality testing.


(rosiecorn) #49

An API is an Application Programming Interface. This is an interface to an application designed for other computer systems to use. As opposed to a Graphical User Interface (GUI) which is designed for humans to use.

APIs come in many different forms with and technical implementations such as HTTP or Web APIs

An HTTP based API is often called a WebAPI since they are used to access Web Applications which are deployed to Servers accessible over the Internet.

Applications which are accessed via HTTP APIs are often called Web Services. Mobile Applications often use Web Services and REST APIs to communicate with servers to implement their functionality. The Mobile Application processes the message returned from the Web Service and displays it to the User in the application GUI. So again, the user is unaware that HTTP requests are being made, or of the format of the requests and responses. (a reference a book named “Automating andTesting a REST API”, This book is for sale at http://leanpub.com/testrestapi)

Below are some types of API testing

  • Syntax Testing
  • Functionality Testing
  • Reliability Testing
  • Performance Testing
  • Security Testing
  • Negative Testing

(KMS Nam Nguyen) #50

API testing is a type of software testing involving the testing of application programming interfaces (APIs) directly.
It is part of an integrated test to determine if the system meets the performance, reliability, performance and security requirements.
Since APIs do not have GUIs, API testing is work at the business layer (bussiness layer), the status will be is Pass/Fail.

During API testing, data is exchanged from XML or JSON through HTTP requests and responses. These are independent technologies and will work with many different programming languages and technologies.


(Hang Truong) #51

Many companies are moving toward a Microservices model for their software applications. And most microservices are using application programming interfaces (APIs), which are a set of commands for how a service can be used. And most APIs are using Representational State Transfer (REST) requests through Hypertext Transfer Protocol (HTTP) to request and send data.
A REST request is made up of the following parts:

  • An HTTP verb that describes what action should be taken
  • A Uniform Resource Locator (URL) that defines the location of the request
  • HTTP headers that provide information to the server about the request
  • A request body that provides further details for the request (this can sometimes be empty)

Here are the most common HTTP verbs:

  • A GET request fetches a record from a database
  • A POST request adds a new record to a database
  • A PUT request replaces a record with a new one
  • A PATCH request replaces part of a record with new information
  • A DELETE request removes a record from a database

(Duong) #52

What is an API?

An Application Programming Interface (API) at its core is a formal specification that acts as a guaranteed contract between two separate pieces of software

Modern computer systems are generally designed using the ‘layered architecture approach’:
image

How is An API Defined?

As mentioned above, an API at its core is a formal specification that acts as a guaranteed contract between two separate pieces of software. The API provider defines the set of operations, data formats and protocols that it expects, and the consumer of the API (called the client) will use those rules on the understanding that, as long as it follows the rules, the client will always be able to use the API without having to worry about the internals of the API itself:

Dealing with API Changes

So what happens when you want to change an API and expose new functionality? You basically have two choices:

  • Change the existing API to reflect the updated version. However, this is called “breaking compatibility” and means that all clients of the API will need to be updated. Sometimes this is necessary but it should be avoided if possible. This is especially true for applications that are widely used and have many applications dependent on them.

  • Create a New API Version and Leave the Old API. This is the recommended option where possible. You create a new API to expose the new functionality but leave the old API in place for existing clients. You may need to add a translation layer to ensure the old API behaves exactly the same as before.

API Testing

API testing involves testing the application programming interfaces (APIs) directly and as part of integration testing to determine if they meet expectations for functionality, reliability, performance, and security. Since APIs lack a GUI, API testing is performed at the message layer. API testing is critical for automating testing because APIs now serve as the primary interface to application logic and because GUI tests are difficult to maintain with the short release cycles and frequent changes commonly used with Agile software development and DevOps.

For more details, refer here


(kms_lantran) #53

I am a manual tester. This is the first time I am trying to know for API testing. Basically, I understand the API testing is sending the request, getting the response of the functionality, performance and security for the product/ website without UI.

To start the #30daysoftesting, I searched and linked to over 10 pages about the API testing. The definition for API testing is the same on almost those pages:

API testing is a type of software testing that involves testing application programming interfaces (APIs) directly and as part of integration testing to determine if they meet expectations for functionality, reliability, performance, and security. Since APIs lack a GUI, API testing is performed at the message layer

Actually, we cannot refuse that correct definition. It is easy and clear enough for the new one like me to understand.

Enjoy the very first day of API testing #30daysoftesting challenge!!!


(Huyen Truong) #54

Katalon is a cool tool where supports automation test including API and mobile app. Thank for suggestion


(Dong) #56

Thanks for all of your replies, now I know more about API and API testing! There are so many explanations for API testing, and here is my contribution:

from the definition of Testing (cite from Wikipedia):

Software testing is an investigation conducted to provide stakeholders with information about the quality of the software product or service under test.

and the definition of API (cite from Wikipedia):

In general terms, API is a set of clearly defined methods of communication among various components

So for me, API Testing is:

A process to ensure the APIs are working as expected (by providing stakeholders with information about the quality of the API via Software Product), and so the program/functions can working properly with that APIs.

Hope that’s useful :smiley:


(Tuan Tran) #57

API testing is a type of software testing that involves testing APIs directly and also as a part of integration testing to check whether the API meets expectations in terms of functionality, reliability, performance, and security of an application. It mainly concentrates on the business logic layer of the software architecture. This testing won’t concentrate on the look and feel of an application.


(Deepak) #58

In simple one line sentence I can say-
“API testing is nothing but process request(Server/client side) by validating your business logic.”

sorry for replying very late.


(Tuan Tran) #59

API testing is a type of software testing that involves testing APIs directly and also as a part of integration testing to check whether the API meets expectations in terms of functionality, reliability, performance, and security of an application. It mainly concentrates on the business logic layer of the software architecture.
This testing doesn’t concentrate on the look and feel of an application.


(Claire Mackerras) #60

API is an abbreviation which delegates as Application Programming Interface. API being a language independent holds an array of protocols, routines, and tools for designing Software Applications. APIs set a podium where one software program can articulate with another software program.
Protocols: An arrangement for transferring data between two systems.

Routine: a program that executes a particular task. Routine is also called as function, procedure or subroutine.

API serves as an interface which enables communication and data exchange between two separate software systems. API encompasses various software functions which can be put into effect by another software program.

Being cost-effective, API testing comprises testing APIs directly and also as a part of assimilation testing to verify whether the API fulfills expectations with reference to dependability, functionality, performance, and assurance of an application.

With API testing, minor bugs are detected as well as it requires less code which offers faster and better test coverage.

What precisely needs to be certified in API Testing?

• Data precision
• HTTP status algorithms
• Response duration
• Error codes by any chance API return any faults
• Endorsement checks
• Nonfunctional testing, for instance, performance testing, security testing.

API Architecture

API calls collection includes two things:

  1. HTTP headers: HTTP headers are always dependent on your application.
  2. HTTP Request: There are mainly four types of requests.

We can perform automation testing of API through Postman and selenium Web driver.

Hope this is useful !


(Tien) #62

Thanks to all you guys. I’m a newbie in API Testing. For me, API Testing is a type of Software Testing that we use an API Testing tool (such as Katalon, Postman, SoapUI…) to validate the business logic on the server. Think simple, each request sent from client to server should be received a proper response.

And It’s so cool when I can start to learn everything in details about API Testing in Katalon Docs. Yeah! Very detailed and easy to understand. Hope you like it too.

API testing is a type of software testing that involves testing application programming interfaces (APIs) directly and as part of integration testing to determine if they meet expectations for functionality, reliability, performance, and security. Since APIs lack a GUI, API testing is performed at the message layer and can validate application logic very quickly and effectively.

API testing is critical for automation testing and CI/CD process because it can coop with short release cycles and frequent changes especially the presentation layer without breaking the test outputs. API testing also requires less maintenance effort compare to UI automation testing which makes it a preferred choice for Agile and DevOps teams.

https://docs.katalon.com/katalon-studio/tutorials/introduction_api_testing.html


(trung tran) #63

Thanks for your in your information


(le ha) #64

Wonderful! i want to try it now. Tks for your sharing!


(Owupele) #65

Day 1 - API testing involves testing API as part of integration testing to determine it has met expectations for functionality, reliability, performance, and security.