Notice: This page requires JavaScript to function properly.
Please enable JavaScript in your browser settings or update your browser.
Integration - API Testing | Functional Testing
Introduction to Manual Testing & QA in Web Development
course content

Course Content

Introduction to Manual Testing & QA in Web Development

Introduction to Manual Testing & QA in Web Development

1. Introduction to Software Testing & QA
2. Software Testing in Practice
3. Functional Testing
4. Non-Functional Testing

book
Integration - API Testing

What is an API?

An API endpoint (/history) has been added to the application which is supposed to return an array of all the chat messages in response to a GET request. We can also request an array of all the messages sent by a specific user by specifying the username through the sender parameter.

API, also known as Application Programming Interface, is an interface which lets us communicate with an application or make changes in that application through HTTP requests.

An application can be a website, database, a desktop application, or anything else.

HTTP requests are basically messages sent to a specific server. The reason they are called "requests" is because these messages "request" the server to either provide some data, or make some changes to the data on the server.

There are multiple types of HTTP requests. The two most common types are GET and POST requests. The HTTP request which tries to "get" some data from a server is known as a GET request, while an HTTP request which tries to "post" or "deliver" some data to a server is known as a POST request.

When we visit a website, we are essentially making an HTTP GET request to that website's server, which responds by sending us the website files, and our browser displays the website using those website files - those files are mostly deleted by the browser when the user closes the website.

The following diagram illustrates the process of an HTTP request. Note that the API is generally a part of the application itself, and it allows external sources to access or modify the data inside the application under certain conditions.

Testing an API

Testing an API also comes under the category of Integration Testing, since APIs are usually made by combining multiple different modules of the application. In our case, the API queries the Database-which is a separate module-and returns the response in JSON format.

We can use a web application known as Postman to test APIs. Postman is a powerful tool used by developers and testers to test APIs.

Everything was clear?

How can we improve it?

Thanks for your feedback!

Section 3. Chapter 4
We're sorry to hear that something went wrong. What happened?
some-alt