SlideShare a Scribd company logo
2
Most read
3
Most read
4
Most read
www.tothenew.com
Basics of API Testing
By Keshav
www.tothenew.com
Agenda of API Testing
API TESTING TOOL SELECTION WORKFLOW
API and API Testing Right tool for API Testing How API works ?
API Methods ADVANTAGES DEMO
Different API Methods Advantages of API Testing Live Demo
www.tothenew.com
What is API?
API stands for Application
Programming Interface.
API is an software to software
interface, not a user interface.
With APIs, applications talk to
each other without any user
knowledge or intervention.
Implemented by writing function
calls in the program.
www.tothenew.com
What is API Testing?
API testing uses software to send
calls to the API and get the
output.
API testing treats the component
under test as a black box.
The goal of API testing is to verify
correct performance and error
handling of the component prior
to its integration into an
application.
www.tothenew.com
API Workflow
www.tothenew.com
API Workflow
Response
Response
Request
www.tothenew.com
REST API
REST – stands for Representational State Transfer.
 It is a set of functions to which the developers performs requests and
receive responses. In REST API interaction is made via HTTP protocol.
 REST also allows computers to talk to each other over a network.
 It involves using HTTP methods to send and receive messages, and does
not require a strict message definition, unlike Web services.
 REST messages often take the form of XML, or JavaScript Object
Notation (JSON).
www.tothenew.com
HTTP Methods
4 Commonly Used Methods:-
GET : - Provides a read only access to a resource.
POST :- Used to update an existing resource or create a new resource.
PUT :- Used to create a new resource.
DELETE :- Used to Remove a resource.
RESOUCE GET PUT POST DELETE
URL Retrieve the
member
Create / Replace a
new resource
Create new
entry
Used to remove a
resource
www.tothenew.com
PUT
REQUEST
PUT
RESPONSE
What is API Testing ?
GET
REQUEST
GET
RESPONSE
POST
REQUEST
POST
RESPONSE
DELETE
REQUEST
DELETE
RESPONSE
www.tothenew.com
REST API Inputs
GET POST PUT DELETE
Method - GET Method - POST Method - PUT Method - DELETE
URL URL URL URL
Custom-Header Custom-Header Custom-Header Custom-Header
Input JSON
www.tothenew.com
GET Methods
Request
GET
https://uat-beam-
ms.livfame.com/v1/event/de
tail?beamId=7767
Response
Status : 200 OK
{
message: "Beam Detail fetched successfully"
data:
{
name : "name goes here"
eventStatus : "COMPLETED"
startTime : "10 Oct 2015
14:25:00"
viewCount : "2354"
likeCount : 88
disLikeCount : 99
commentCount : 5
duration : 1490
performerId : 10244
}
status: 1
}
www.tothenew.com
POST Methods
Request
POST
URL : http://qa-
api.livfame.com/api/v11_1
{
"email“ : "kkashyap1707@gmail.com",
"password“ : "admin",
"medium“ : "MANUAL",
"apiVersion“ : "1.0",
"appKey“ : "myAppKey",
"actionName“ : "login"
}
Response
Status : 200 OK
{
"status": 1,
"message": "Login successfully",
"data": {
"access_token": "rcd676up5kit3akd93a",
"email": "admn.famelive@gmail.com",
"roles": "[ROLE_USER]",
"userId": "1",
"isAccountVerified": true,
"timeZoneName": "GMT +05:30 - New Delhi",
"timeZoneId": 8,
"fameName": "admin.famelive",
"imageName": "zsdasdaw",
"userChannel": "a468784e6e2a9874619e7f",
},
"code": 10001
}
www.tothenew.com
PUT Methods
Request
GET
https://uat-beam-
ms.livfame.com/v1/event/detai
l?beamId=7767
Response
Status : 200 OK
{
message: "Beam Detail fetched successfully"
data:
{
name: "name goes here"
eventStatus: "COMPLETED"
startTime: "10 Oct 2015 14:25:00"
viewCount: "2354"
likeCount: 88
disLikeCount: 99
commentCount: 5
duration: 1490
performerId: 10244
}
status: 1
}
www.tothenew.com
DELETE Methods
Request
GET
https://uat-beam-
ms.livfame.com/v1/event/detai
l?beamId=7767
Response
Status : 200 OK
{
message: "Beam Detail fetched successfully"
data:
{
name: "name goes here"
eventStatus: "COMPLETED"
startTime: "10 Oct 2015 14:25:00"
viewCount: "2354"
likeCount: 88
disLikeCount: 99
commentCount: 5
duration: 1490
performerId: 10244
}
status: 1
}
www.tothenew.com
HTTP Response Codes
Some HTTP response codes, which are often used with REST:-
200 OK: - Code indicates that the request was successful.
201 Created:- Code indicates that request was successful and a resource was created. It is used
to confirm success of a PUT or POST request.
400 Bad Request :- It happens especially with POST and PUT requests, when the data does not
pass validation, or is in the wrong format.
404 Not Found:- response indicates that the required resource could not be found.
401 Unauthorized:- error indicates that you need to perform authentication before accessing the
resource.
405 Method Not Allowed:- HTTP method used is not supported for this resource.
409 Conflict:- Conflict request to create the same resource twice.
500 Internal Server Error:- Occurs due to some error on Server side.
www.tothenew.com
Common Types of Tests in API Testing
Common API Bugs:-
 Verify if API doesn’t return any response.
 Based on input request, return request should be checked.
 Verification of the API whether it triggers some other event or calls
another API
 Verification of the API whether it is updating any data structure
 Delayed in API Response time
 Response Data is not structured
 Difficulty in connecting and getting response from API
www.tothenew.com
Advantages of API Testing
Advantages of API Testing:-
 Time Effective
 Language Independent
 Test Core Functionality
 Reduce Testing cost
 Reduced Risks
www.tothenew.com
Challenges of API Testing
Challenges of API Testing:-
 Main challenges in API testing is Parameter Combination, Parameter
Selection, and Call Sequencing
 There is no GUI available to test the application which makes difficult to
give input values
 Parameters selection and categorization required to be known to the
testers
 Exception handling function needs to be tested
www.tothenew.com
Basic Inputs
URL : http://qa-api.livfame.com/api/v11_1
Header Method
Output ResponseInput JSON
www.tothenew.com
Questions
www.tothenew.com
Client Location
Our Office
Email us at:
Keshav.Kashyap@tothenew.com

More Related Content

PPTX
API Testing for everyone.pptx
PPT
Postman.ppt
PPTX
Rest assured
PPTX
Api Testing
PPTX
Api testing
PDF
API Testing
PDF
PDF
An Introduction To Automated API Testing
API Testing for everyone.pptx
Postman.ppt
Rest assured
Api Testing
Api testing
API Testing
An Introduction To Automated API Testing

What's hot (20)

PDF
API Testing: The heart of functional testing" with Bj Rollison
PPTX
Api Testing
PPT
Automation testing
PPSX
API Test Automation
PDF
API Testing. Streamline your testing process.
PDF
Postman: An Introduction for Testers
PPTX
Postman. From simple API test to end to end scenario
PPTX
What is an API?
PPT
Introduction to the Web API
PPTX
Introduction to Automation Testing
PPTX
RESTful API Testing using Postman, Newman, and Jenkins
PDF
API_Testing_with_Postman
PDF
An Introduction to Test Driven Development
PPTX
Test Design and Automation for REST API
PDF
Reasons To Automate API Testing Process
PPSX
Rest api standards and best practices
PPTX
Introduction to APIs (Application Programming Interface)
PPTX
REST API Design & Development
PPTX
API Testing Using REST Assured with TestNG
PDF
Rest API Automation with REST Assured
API Testing: The heart of functional testing" with Bj Rollison
Api Testing
Automation testing
API Test Automation
API Testing. Streamline your testing process.
Postman: An Introduction for Testers
Postman. From simple API test to end to end scenario
What is an API?
Introduction to the Web API
Introduction to Automation Testing
RESTful API Testing using Postman, Newman, and Jenkins
API_Testing_with_Postman
An Introduction to Test Driven Development
Test Design and Automation for REST API
Reasons To Automate API Testing Process
Rest api standards and best practices
Introduction to APIs (Application Programming Interface)
REST API Design & Development
API Testing Using REST Assured with TestNG
Rest API Automation with REST Assured
Ad

Viewers also liked (16)

PDF
How to Automate API Testing
PDF
4 Major Advantages of API Testing
PPT
Soa testing soap ui (2)
PPTX
REST API testing with SpecFlow
PPTX
Getting Started with API Security Testing
PDF
Automate REST API Testing
PPTX
Testing soapui
PPTX
Testing Agile Web Services from soapUI
PPTX
An introduction to api testing | David Tzemach
PPT
SOAP-UI The Web service Testing
PPT
Presentation for soap ui
PPT
Ppt of soap ui
PPTX
Learn SoapUI
PPTX
Testing web services
PDF
Web Services Automated Testing via SoapUI Tool
How to Automate API Testing
4 Major Advantages of API Testing
Soa testing soap ui (2)
REST API testing with SpecFlow
Getting Started with API Security Testing
Automate REST API Testing
Testing soapui
Testing Agile Web Services from soapUI
An introduction to api testing | David Tzemach
SOAP-UI The Web service Testing
Presentation for soap ui
Ppt of soap ui
Learn SoapUI
Testing web services
Web Services Automated Testing via SoapUI Tool
Ad

Similar to Api testing (20)

PDF
TEST PPTBCHDBHBHBHVBHJEFVHJVBFHVBFHVBHFVBFHVHFVBFHVBHFVBFHVBFHVBFVBFVBHVBVBFHVB
PPTX
API tESTUBGDBCJBCJFBCJBFBVJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJ...
PDF
Next-Level API Automation Testing Techniques – Part 1
PDF
API Testing Interview Preparation and Methods
PPTX
B4USolution_API-Testing
PPTX
API-Testing-Interview-Questions-and-Answers(Edited).pptx
PPTX
API Documentation - StudySection
PPTX
API Documentation - StudySection
PPTX
Soap UI and postman
PDF
What is API test automation
PPTX
A basic introduction to API Testing & its importance.
PDF
Webservicex.pdf
PPTX
Belajar Postman test runner
PPTX
API for newbs
PPTX
Apitesting.pptx
PDF
Blue and Orange Minimalist Marketing Plan Presentation.pdf
PDF
API Testing Interview Questions PDF By ScholarHat
PPTX
API testing - Japura.pptx
PDF
What is API Testing? A Comprehensive Guide
PPTX
API testing training in madhapur, hyderabad
TEST PPTBCHDBHBHBHVBHJEFVHJVBFHVBFHVBHFVBFHVHFVBFHVBHFVBFHVBFHVBFVBFVBHVBVBFHVB
API tESTUBGDBCJBCJFBCJBFBVJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJ...
Next-Level API Automation Testing Techniques – Part 1
API Testing Interview Preparation and Methods
B4USolution_API-Testing
API-Testing-Interview-Questions-and-Answers(Edited).pptx
API Documentation - StudySection
API Documentation - StudySection
Soap UI and postman
What is API test automation
A basic introduction to API Testing & its importance.
Webservicex.pdf
Belajar Postman test runner
API for newbs
Apitesting.pptx
Blue and Orange Minimalist Marketing Plan Presentation.pdf
API Testing Interview Questions PDF By ScholarHat
API testing - Japura.pptx
What is API Testing? A Comprehensive Guide
API testing training in madhapur, hyderabad

More from Keshav Kashyap (6)

PPTX
Next level of Appium
PPT
PPTX
#Fame case study
PPT
Google Analytics Report Automation (Magic)
PPT
Google Analytics Report Automation (Magic Script)
PPT
Google Analytics Report Automation (Magic Script)
Next level of Appium
#Fame case study
Google Analytics Report Automation (Magic)
Google Analytics Report Automation (Magic Script)
Google Analytics Report Automation (Magic Script)

Recently uploaded (20)

PDF
Softaken Excel to vCard Converter Software.pdf
PDF
System and Network Administraation Chapter 3
PPTX
ISO 45001 Occupational Health and Safety Management System
PDF
PTS Company Brochure 2025 (1).pdf.......
PPTX
Odoo POS Development Services by CandidRoot Solutions
PDF
How to Migrate SBCGlobal Email to Yahoo Easily
PDF
Flood Susceptibility Mapping Using Image-Based 2D-CNN Deep Learnin. Overview ...
PDF
Design an Analysis of Algorithms II-SECS-1021-03
PPT
JAVA ppt tutorial basics to learn java programming
PDF
Addressing The Cult of Project Management Tools-Why Disconnected Work is Hold...
PDF
Claude Code: Everyone is a 10x Developer - A Comprehensive AI-Powered CLI Tool
PPTX
history of c programming in notes for students .pptx
PDF
Wondershare Filmora 15 Crack With Activation Key [2025
PDF
medical staffing services at VALiNTRY
PDF
T3DD25 TYPO3 Content Blocks - Deep Dive by André Kraus
PDF
2025 Textile ERP Trends: SAP, Odoo & Oracle
PDF
AI in Product Development-omnex systems
DOCX
The Five Best AI Cover Tools in 2025.docx
PDF
System and Network Administration Chapter 2
PDF
Upgrade and Innovation Strategies for SAP ERP Customers
Softaken Excel to vCard Converter Software.pdf
System and Network Administraation Chapter 3
ISO 45001 Occupational Health and Safety Management System
PTS Company Brochure 2025 (1).pdf.......
Odoo POS Development Services by CandidRoot Solutions
How to Migrate SBCGlobal Email to Yahoo Easily
Flood Susceptibility Mapping Using Image-Based 2D-CNN Deep Learnin. Overview ...
Design an Analysis of Algorithms II-SECS-1021-03
JAVA ppt tutorial basics to learn java programming
Addressing The Cult of Project Management Tools-Why Disconnected Work is Hold...
Claude Code: Everyone is a 10x Developer - A Comprehensive AI-Powered CLI Tool
history of c programming in notes for students .pptx
Wondershare Filmora 15 Crack With Activation Key [2025
medical staffing services at VALiNTRY
T3DD25 TYPO3 Content Blocks - Deep Dive by André Kraus
2025 Textile ERP Trends: SAP, Odoo & Oracle
AI in Product Development-omnex systems
The Five Best AI Cover Tools in 2025.docx
System and Network Administration Chapter 2
Upgrade and Innovation Strategies for SAP ERP Customers

Api testing

  • 1. www.tothenew.com Basics of API Testing By Keshav
  • 2. www.tothenew.com Agenda of API Testing API TESTING TOOL SELECTION WORKFLOW API and API Testing Right tool for API Testing How API works ? API Methods ADVANTAGES DEMO Different API Methods Advantages of API Testing Live Demo
  • 3. www.tothenew.com What is API? API stands for Application Programming Interface. API is an software to software interface, not a user interface. With APIs, applications talk to each other without any user knowledge or intervention. Implemented by writing function calls in the program.
  • 4. www.tothenew.com What is API Testing? API testing uses software to send calls to the API and get the output. API testing treats the component under test as a black box. The goal of API testing is to verify correct performance and error handling of the component prior to its integration into an application.
  • 7. www.tothenew.com REST API REST – stands for Representational State Transfer.  It is a set of functions to which the developers performs requests and receive responses. In REST API interaction is made via HTTP protocol.  REST also allows computers to talk to each other over a network.  It involves using HTTP methods to send and receive messages, and does not require a strict message definition, unlike Web services.  REST messages often take the form of XML, or JavaScript Object Notation (JSON).
  • 8. www.tothenew.com HTTP Methods 4 Commonly Used Methods:- GET : - Provides a read only access to a resource. POST :- Used to update an existing resource or create a new resource. PUT :- Used to create a new resource. DELETE :- Used to Remove a resource. RESOUCE GET PUT POST DELETE URL Retrieve the member Create / Replace a new resource Create new entry Used to remove a resource
  • 9. www.tothenew.com PUT REQUEST PUT RESPONSE What is API Testing ? GET REQUEST GET RESPONSE POST REQUEST POST RESPONSE DELETE REQUEST DELETE RESPONSE
  • 10. www.tothenew.com REST API Inputs GET POST PUT DELETE Method - GET Method - POST Method - PUT Method - DELETE URL URL URL URL Custom-Header Custom-Header Custom-Header Custom-Header Input JSON
  • 11. www.tothenew.com GET Methods Request GET https://uat-beam- ms.livfame.com/v1/event/de tail?beamId=7767 Response Status : 200 OK { message: "Beam Detail fetched successfully" data: { name : "name goes here" eventStatus : "COMPLETED" startTime : "10 Oct 2015 14:25:00" viewCount : "2354" likeCount : 88 disLikeCount : 99 commentCount : 5 duration : 1490 performerId : 10244 } status: 1 }
  • 12. www.tothenew.com POST Methods Request POST URL : http://qa- api.livfame.com/api/v11_1 { "email“ : "kkashyap1707@gmail.com", "password“ : "admin", "medium“ : "MANUAL", "apiVersion“ : "1.0", "appKey“ : "myAppKey", "actionName“ : "login" } Response Status : 200 OK { "status": 1, "message": "Login successfully", "data": { "access_token": "rcd676up5kit3akd93a", "email": "admn.famelive@gmail.com", "roles": "[ROLE_USER]", "userId": "1", "isAccountVerified": true, "timeZoneName": "GMT +05:30 - New Delhi", "timeZoneId": 8, "fameName": "admin.famelive", "imageName": "zsdasdaw", "userChannel": "a468784e6e2a9874619e7f", }, "code": 10001 }
  • 13. www.tothenew.com PUT Methods Request GET https://uat-beam- ms.livfame.com/v1/event/detai l?beamId=7767 Response Status : 200 OK { message: "Beam Detail fetched successfully" data: { name: "name goes here" eventStatus: "COMPLETED" startTime: "10 Oct 2015 14:25:00" viewCount: "2354" likeCount: 88 disLikeCount: 99 commentCount: 5 duration: 1490 performerId: 10244 } status: 1 }
  • 14. www.tothenew.com DELETE Methods Request GET https://uat-beam- ms.livfame.com/v1/event/detai l?beamId=7767 Response Status : 200 OK { message: "Beam Detail fetched successfully" data: { name: "name goes here" eventStatus: "COMPLETED" startTime: "10 Oct 2015 14:25:00" viewCount: "2354" likeCount: 88 disLikeCount: 99 commentCount: 5 duration: 1490 performerId: 10244 } status: 1 }
  • 15. www.tothenew.com HTTP Response Codes Some HTTP response codes, which are often used with REST:- 200 OK: - Code indicates that the request was successful. 201 Created:- Code indicates that request was successful and a resource was created. It is used to confirm success of a PUT or POST request. 400 Bad Request :- It happens especially with POST and PUT requests, when the data does not pass validation, or is in the wrong format. 404 Not Found:- response indicates that the required resource could not be found. 401 Unauthorized:- error indicates that you need to perform authentication before accessing the resource. 405 Method Not Allowed:- HTTP method used is not supported for this resource. 409 Conflict:- Conflict request to create the same resource twice. 500 Internal Server Error:- Occurs due to some error on Server side.
  • 16. www.tothenew.com Common Types of Tests in API Testing Common API Bugs:-  Verify if API doesn’t return any response.  Based on input request, return request should be checked.  Verification of the API whether it triggers some other event or calls another API  Verification of the API whether it is updating any data structure  Delayed in API Response time  Response Data is not structured  Difficulty in connecting and getting response from API
  • 17. www.tothenew.com Advantages of API Testing Advantages of API Testing:-  Time Effective  Language Independent  Test Core Functionality  Reduce Testing cost  Reduced Risks
  • 18. www.tothenew.com Challenges of API Testing Challenges of API Testing:-  Main challenges in API testing is Parameter Combination, Parameter Selection, and Call Sequencing  There is no GUI available to test the application which makes difficult to give input values  Parameters selection and categorization required to be known to the testers  Exception handling function needs to be tested
  • 19. www.tothenew.com Basic Inputs URL : http://qa-api.livfame.com/api/v11_1 Header Method Output ResponseInput JSON
  • 21. www.tothenew.com Client Location Our Office Email us at: Keshav.Kashyap@tothenew.com