Header Ads

API testing | First Session | Full API testing course | Part 1

Today we are going to start API testing and as part of today's session, we are going to see the fundamentals like what is an API and what kind of testings we do as part of API testing before discussing API testing we have to know some Basics about what is client, what is server and how exactly web applications Works internally.  we need to have some basic knowledge of web testing before starting API testing and in today's session, we will see some Basics.  Then we will try to understand what is API testing is, how we can conduct API testing and what different tools are available in the market to perform API testing. so that's a basic introduction part today we are going to see and at the end of the session  if you have any questions you can ask me in the comment section




what is actually software?  


Software is an application that is developed for a specific client or some customer or sometimes the software can be developed based on the market requirement also and which is basically called a product so where exactly does API testing come into the picture so there are various types of testing we will conduct on software like web testing API Testing, mobile app testing, performance testing, security testing there are so many types of testing normally we do on software. We need to do all these kinds of testing because we need to release quality products or software to the customer. API testing is also one of the testing which is very very important to do the software. API testing we will conduct at the backend side so we don't see anything on the UI so we will do API testing at the backend side so which basically comes under backend testing. Backend testing like API testing, and database testing so these things come under backend testing, not front-end, and web testing comes under front-end testing so we have also different tools available in the market to perform web testing we use selenium normally and to perform API testing we use Postman and rest assured and so many tools are there in the market so different tools are present for a different type of testings. 

For API testing we can do it manually and also we can do it automatically and perform manual API testing normally we use a tool called Postman and then to perform automation testing we will use a rest assured.

Postman

We will try to understand what is Postman how to use Postman how we can test APIs manually by using Postman and what the different features are in the Postman so we'll try to understand and we will practically test all the APIs by using the Postman tool once you understand manual testing of APIs then we will move on to the automation part that is rest assured that in the rest assured, we will try to automate the API using rest assured.

Prerequisite


The main prerequisite is that you have to know Java programming Basics and then you should also know some basics of the testNG framework. so if you learn web testing these two things will be part of your web testing and even if you don't know testNG no problem.

But at least we have to know some Java Basics,  how we can write a simple Java program if you know some basics of Java you can easily understand this and it is very easy to learn also and even web testing is something trickier than API testing and you can easily learn API testing.

first, we will see manual testing of APIs using the Postman tool, and once you understand the replay testing using manual process then we will try to learn to automate APIs by using rest assured


Client and Server

First of all, let us see what is client and server. These two terminologies we use normally while working with web-based applications are a client and the server what is a client and what is a server a simple understanding is server means what contains the actual application.so which contains an actual application or software will run on the server and we will able to access through the client is nothing but a server. And from where we are accessing the application. is called a client. for example on the web application suppose you are typing google.com and we are able to access Google pages from the server and we are not those pages are not coming from your local system so they are coming from somewhere else and we are trying to access them through the browser so from where you are trying to access that is called a client and from where actually the software is installed or from where exactly the web pages still exist which is basically called a server. so a client is a computer hardware or software that accesses a service made available by the server.


A simple way to understand is a client is a computer or from where we are trying to access the application so for example through a browser we are able to browse the different pages and different websites we can access and that comes under the client and actually where the applications are installed from where we are able to exactly accessing that is basically called as a server And between the client and server, we need a connection so through the internet we are able to establish a connection to the server and then we are able to access it client as a user I'm able to access the applications through browser this is a client and from where we are getting these pages, from where we are getting all this information, where exactly this information is available that is called a server

3-Tier Architecture


Now let us try to understand what exactly one-tier, two-tier, and three-tier architecture. 

One-tier Architecture:

One-tier architecture is nothing but what we have a single system we do not have any internet. A single system where the client will be running and there will not be any database. there will be some files let's say I'm using some notepad I'm typing something or I'm typing something in the MS Word or Excel sheet and when you're saving those files where exactly are saving the data in our same machine. we are saving the data and for that, we don't need any internet. we don't need to maintain any databases. so these are all tire architecture. so when you run client and server in the same machine which comes under one tire architecture

Two-Tier Architecture:

Two-tier architecture means they are accessing the database and this database will be there in some other machine.  some other machine we will use as a database server and different client applications will access the same database. suppose you go to any Bank write any banking organization so they will internally maintain their own servers and their staff will access the database let's say 10 to 15 people are working all of them are accessing the same database server which is located in their environment locally and that is comes under two Tire architecture. two tire are nothing but what different lines will able to access a single database server and this database server is a different machine not on the same machine

Three Tier Architecture: 


In three-tier architecture, three layers are present 1). Client layer 2). business layer, 3). database layer.

We are all clients we are browsing the data from the browser and database is what actual data will be stored in the database and between the client and the server there should be some business logic running and what is the responsibility of this business logic layer is which will take our request from the client and same request will send to the database and fetch the data and again send back to the business logic layer and same business logic will again send the response to the client so this is an indirect process between the client and database. All web-based applications come under 3 tier architecture.

Layers of application:-

  • Presentation layer
  • Business layer:- application logic will be written here and APIs are also created here
  • Database layer
Different technologies and languages are used in these layers

  • Presentation layer:- html, css , JavaScript, 
  • Application layer:- java, .net, c#, python, c++, This is called business layer.
  • Data layer:- MySQL, Oracle, PostgreSQL, SQL server , MongoDB

  • Testing at the presentation layer is called GUI/UI testing
  • Testing at the business layer is called  API testing.

In the next session, we will dive into the API testing so stay with us.

Join our telegram channel: Telegram




No comments

Powered by Blogger.