Session1: Introduction to API Testing
1:28:06

Session1: Introduction to API Testing

SDET- QA

6 chapters7 takeaways13 key terms5 questions

Overview

This video introduces the fundamentals of API testing, starting with basic web application concepts like client-server architecture and the three-tier model. It explains what an API (Application Programming Interface) is, emphasizing its role as a mediator between different software components, particularly the presentation and data layers. The video details the importance of API testing for ensuring software quality and efficiency, contrasting it with web UI testing. It also touches upon different types of APIs (SOAP and REST) and the distinction between APIs and web services, concluding with an overview of REST API methods (GET, POST, PUT, DELETE) and protocols (HTTP, HTTPS).

How was this?

Save this permanently with flashcards, quizzes, and AI chat

Chapters

  • Software applications are developed for specific clients or market requirements.
  • Various testing types exist, including web testing and API testing, all aimed at delivering quality products.
  • Web testing focuses on the front-end user interface (UI), while API testing is conducted on the back-end.
  • Tools like Selenium are used for web testing, while Postman and Rest Assured are common for API testing.
Understanding the different layers and types of testing helps learners grasp where API testing fits into the broader software development lifecycle and why it's crucial for quality assurance.
Using Selenium for web testing and Postman for API testing.
  • A client is a device or software that accesses services from a server.
  • A server hosts the application or data that clients access.
  • Web applications typically follow a three-tier architecture: Presentation Layer (UI), Application Layer (business logic), and Data Layer (database).
  • The presentation layer is what the user sees (e.g., a browser interface), the application layer processes requests, and the data layer stores information.
This foundational knowledge explains how web applications function internally, setting the stage for understanding where APIs operate within this structure.
Browsing google.com from your computer (client) accesses data from Google's servers.
  • An API (Application Programming Interface) acts as a mediator, enabling communication between two different applications.
  • APIs reside in the middle layer (application layer) and contain the business logic.
  • They fetch data from the backend (database layer) and present it to the frontend (presentation layer), and vice-versa.
  • API testing involves directly sending requests to the API and validating its responses, rather than testing through the UI.
Understanding APIs as communication bridges is essential for recognizing their role in connecting different software parts and why testing them directly is more efficient.
A travel website like MakeMyTrip uses APIs from various airlines to fetch flight information.
  • API testing allows for earlier detection of bugs, as APIs are often developed before the UI.
  • It reduces the effort needed for UI testing, as core functionality is validated at the API level.
  • Testing APIs directly saves time and resources compared to extensive UI testing.
  • Developers can test APIs independently, even before the UI is fully developed.
Recognizing the benefits of API testing highlights its strategic importance in improving testing efficiency and accelerating the software release cycle.
Completing 70-80% of functional testing at the API level means only 20% of testing is needed on the UI.
  • The two main types of APIs are SOAP (Simple Object Access Protocol) and REST (Representational State Transfer).
  • REST APIs are more modern and widely used than the older SOAP APIs.
  • A web service is essentially an API that is accessible over the internet or a network.
  • All web services are APIs, but not all APIs are web services until they are deployed to a network.
Differentiating between API types and understanding the concept of web services clarifies the terminology and the scope of what can be tested.
Google Maps API, when made available online for other applications to use, functions as a web service.
  • REST APIs commonly use HTTP methods: GET (retrieve data), POST (create data), PUT (update data), and DELETE (remove data).
  • These methods correspond to CRUD (Create, Read, Update, Delete) operations.
  • HTTP and HTTPS are protocols used for communication; HTTPS is the secure version, encrypting data transfer.
  • API testing involves understanding the API's functionality, expected inputs, and desired outputs before validating responses.
Familiarity with REST methods and protocols is fundamental for performing API testing, as these are the building blocks for interacting with and validating APIs.
Using a GET request to retrieve user information or a POST request to create a new user account.

Key takeaways

  1. 1API testing is a crucial part of software quality assurance that focuses on the back-end logic, complementing front-end web testing.
  2. 2Understanding client-server interactions and the three-tier architecture is essential for grasping API functionality.
  3. 3APIs act as intermediaries, enabling different software applications to communicate and share data or functionality.
  4. 4Testing APIs directly is more efficient and allows for earlier bug detection compared to relying solely on UI testing.
  5. 5REST is the dominant API architectural style today, utilizing standard HTTP methods like GET, POST, PUT, and DELETE.
  6. 6A web service is an API made accessible over a network, distinguishing it from APIs used internally or locally.
  7. 7HTTPS provides a secure channel for API communication, encrypting data to protect it during transmission.

Key terms

API (Application Programming Interface)Client-Server ArchitectureThree-Tier ArchitecturePresentation LayerApplication LayerData LayerSOAP APIREST APIWeb ServiceHTTP Methods (GET, POST, PUT, DELETE)HTTPHTTPSURL

Test your understanding

  1. 1What is the primary role of an API in a web application's architecture?
  2. 2How does API testing differ from traditional web UI testing, and what are the benefits of this difference?
  3. 3Explain the concept of the three-tier architecture and identify where APIs typically reside within it.
  4. 4What are the four main HTTP methods used in REST APIs, and what CRUD operation does each typically correspond to?
  5. 5What is the key distinction between an API and a web service?

Turn any lecture into study material

Paste a YouTube URL, PDF, or article. Get flashcards, quizzes, summaries, and AI chat — in seconds.

No credit card required