SlideShare a Scribd company logo
1 of 21
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

What's hot

API Test Automation
API Test Automation API Test Automation
API Test Automation SQALab
 
REST API testing with SpecFlow
REST API testing with SpecFlowREST API testing with SpecFlow
REST API testing with SpecFlowAiste Stikliute
 
RESTful API Testing using Postman, Newman, and Jenkins
RESTful API Testing using Postman, Newman, and JenkinsRESTful API Testing using Postman, Newman, and Jenkins
RESTful API Testing using Postman, Newman, and JenkinsQASymphony
 
Test Design and Automation for REST API
Test Design and Automation for REST APITest Design and Automation for REST API
Test Design and Automation for REST APIIvan Katunou
 
Postman. From simple API test to end to end scenario
Postman. From simple API test to end to end scenarioPostman. From simple API test to end to end scenario
Postman. From simple API test to end to end scenarioHYS Enterprise
 
API Testing. Streamline your testing process.
API Testing. Streamline your testing process.API Testing. Streamline your testing process.
API Testing. Streamline your testing process.Andrey Oleynik
 
4 Major Advantages of API Testing
4 Major Advantages of API Testing4 Major Advantages of API Testing
4 Major Advantages of API TestingQASource
 
Api testing bible using postman
Api testing bible using postmanApi testing bible using postman
Api testing bible using postmanAbhishek Saxena
 
Introduction to the Web API
Introduction to the Web APIIntroduction to the Web API
Introduction to the Web APIBrad Genereaux
 
API Testing Using REST Assured with TestNG
API Testing Using REST Assured with TestNGAPI Testing Using REST Assured with TestNG
API Testing Using REST Assured with TestNGSiddharth Sharma
 
Postman: An Introduction for Testers
Postman: An Introduction for TestersPostman: An Introduction for Testers
Postman: An Introduction for TestersPostman
 

What's hot (20)

Postman.ppt
Postman.pptPostman.ppt
Postman.ppt
 
API Test Automation
API Test Automation API Test Automation
API Test Automation
 
Rest assured
Rest assuredRest assured
Rest assured
 
REST API testing with SpecFlow
REST API testing with SpecFlowREST API testing with SpecFlow
REST API testing with SpecFlow
 
Postman
PostmanPostman
Postman
 
Api testing
Api testingApi testing
Api testing
 
RESTful API Testing using Postman, Newman, and Jenkins
RESTful API Testing using Postman, Newman, and JenkinsRESTful API Testing using Postman, Newman, and Jenkins
RESTful API Testing using Postman, Newman, and Jenkins
 
Test Design and Automation for REST API
Test Design and Automation for REST APITest Design and Automation for REST API
Test Design and Automation for REST API
 
Postman. From simple API test to end to end scenario
Postman. From simple API test to end to end scenarioPostman. From simple API test to end to end scenario
Postman. From simple API test to end to end scenario
 
Api Testing
Api TestingApi Testing
Api Testing
 
Api presentation
Api presentationApi presentation
Api presentation
 
POSTMAN.pptx
POSTMAN.pptxPOSTMAN.pptx
POSTMAN.pptx
 
API Testing. Streamline your testing process.
API Testing. Streamline your testing process.API Testing. Streamline your testing process.
API Testing. Streamline your testing process.
 
4 Major Advantages of API Testing
4 Major Advantages of API Testing4 Major Advantages of API Testing
4 Major Advantages of API Testing
 
Api Testing.pdf
Api Testing.pdfApi Testing.pdf
Api Testing.pdf
 
Api testing bible using postman
Api testing bible using postmanApi testing bible using postman
Api testing bible using postman
 
Introduction to the Web API
Introduction to the Web APIIntroduction to the Web API
Introduction to the Web API
 
API Testing Using REST Assured with TestNG
API Testing Using REST Assured with TestNGAPI Testing Using REST Assured with TestNG
API Testing Using REST Assured with TestNG
 
Web api
Web apiWeb api
Web api
 
Postman: An Introduction for Testers
Postman: An Introduction for TestersPostman: An Introduction for Testers
Postman: An Introduction for Testers
 

Viewers also liked

Soa testing soap ui (2)
Soa testing   soap ui (2)Soa testing   soap ui (2)
Soa testing soap ui (2)Knoldus Inc.
 
Getting Started with API Security Testing
Getting Started with API Security TestingGetting Started with API Security Testing
Getting Started with API Security TestingSmartBear
 
Automate REST API Testing
Automate REST API TestingAutomate REST API Testing
Automate REST API TestingTechWell
 
Testing Agile Web Services from soapUI
Testing Agile Web Services from soapUITesting Agile Web Services from soapUI
Testing Agile Web Services from soapUIPLM Mechanic .
 
An introduction to api testing | David Tzemach
An introduction to api testing | David TzemachAn introduction to api testing | David Tzemach
An introduction to api testing | David TzemachDavid Tzemach
 
SOAP-UI The Web service Testing
SOAP-UI The Web service TestingSOAP-UI The Web service Testing
SOAP-UI The Web service TestingGanesh Mandala
 
Presentation for soap ui
Presentation for soap uiPresentation for soap ui
Presentation for soap uiAnjali Rao
 
Ppt of soap ui
Ppt of soap uiPpt of soap ui
Ppt of soap uipkslide28
 
Testing web services
Testing web servicesTesting web services
Testing web servicesTaras Lytvyn
 
Web Services Automated Testing via SoapUI Tool
Web Services Automated Testing via SoapUI ToolWeb Services Automated Testing via SoapUI Tool
Web Services Automated Testing via SoapUI ToolSperasoft
 

Viewers also liked (13)

Soa testing soap ui (2)
Soa testing   soap ui (2)Soa testing   soap ui (2)
Soa testing soap ui (2)
 
Getting Started with API Security Testing
Getting Started with API Security TestingGetting Started with API Security Testing
Getting Started with API Security Testing
 
Automate REST API Testing
Automate REST API TestingAutomate REST API Testing
Automate REST API Testing
 
Testing soapui
Testing soapuiTesting soapui
Testing soapui
 
Testing Agile Web Services from soapUI
Testing Agile Web Services from soapUITesting Agile Web Services from soapUI
Testing Agile Web Services from soapUI
 
An introduction to api testing | David Tzemach
An introduction to api testing | David TzemachAn introduction to api testing | David Tzemach
An introduction to api testing | David Tzemach
 
SOAP-UI The Web service Testing
SOAP-UI The Web service TestingSOAP-UI The Web service Testing
SOAP-UI The Web service Testing
 
Presentation for soap ui
Presentation for soap uiPresentation for soap ui
Presentation for soap ui
 
Ppt of soap ui
Ppt of soap uiPpt of soap ui
Ppt of soap ui
 
Soap ui
Soap uiSoap ui
Soap ui
 
Learn SoapUI
Learn SoapUILearn SoapUI
Learn SoapUI
 
Testing web services
Testing web servicesTesting web services
Testing web services
 
Web Services Automated Testing via SoapUI Tool
Web Services Automated Testing via SoapUI ToolWeb Services Automated Testing via SoapUI Tool
Web Services Automated Testing via SoapUI Tool
 

Similar to Api testing

A Practical Guide to Automating End-to-End API Testing
A Practical Guide to Automating End-to-End API TestingA Practical Guide to Automating End-to-End API Testing
A Practical Guide to Automating End-to-End API TestingpCloudy
 
Best Practices for Architecting a Pragmatic Web API.
Best Practices for Architecting a Pragmatic Web API.Best Practices for Architecting a Pragmatic Web API.
Best Practices for Architecting a Pragmatic Web API.Mario Cardinal
 
Creating a World-Class RESTful Web Services API
Creating a World-Class RESTful Web Services APICreating a World-Class RESTful Web Services API
Creating a World-Class RESTful Web Services APIDavid Keener
 
2022 APIsecure_Making webhook APIs secure for enterprise
2022 APIsecure_Making webhook APIs secure for enterprise2022 APIsecure_Making webhook APIs secure for enterprise
2022 APIsecure_Making webhook APIs secure for enterpriseAPIsecure_ Official
 
API Check Overview - Rigor Monitoring
API Check Overview - Rigor MonitoringAPI Check Overview - Rigor Monitoring
API Check Overview - Rigor MonitoringAnthony Ferrari
 
Web Services Testing
Web Services TestingWeb Services Testing
Web Services TestingDataArt
 
MuleSoft Surat Virtual Meetup#21 - MuleSoft API and RAML Design Best Practice...
MuleSoft Surat Virtual Meetup#21 - MuleSoft API and RAML Design Best Practice...MuleSoft Surat Virtual Meetup#21 - MuleSoft API and RAML Design Best Practice...
MuleSoft Surat Virtual Meetup#21 - MuleSoft API and RAML Design Best Practice...Jitendra Bafna
 
Do not automate GUI testing
Do not automate GUI testingDo not automate GUI testing
Do not automate GUI testingAtila Inovecký
 
API Summit 2021: What to know before you start dating APIs.pdf
API Summit 2021: What to know before you start dating APIs.pdfAPI Summit 2021: What to know before you start dating APIs.pdf
API Summit 2021: What to know before you start dating APIs.pdfNITHIN S.S
 
Selenium API Testing.pdf
Selenium API Testing.pdfSelenium API Testing.pdf
Selenium API Testing.pdfAnanthReddy38
 
The Top Tips You need to Learn about Data in your Mobile App
The Top Tips You need to Learn about Data in your Mobile AppThe Top Tips You need to Learn about Data in your Mobile App
The Top Tips You need to Learn about Data in your Mobile AppWoodruff Solutions LLC
 
What is API test automation
What is API test automation What is API test automation
What is API test automation Aparna Sharma
 
APIs explained for product managers
APIs explained for product managersAPIs explained for product managers
APIs explained for product managersRichard Holmes
 
ApiDD Overview
ApiDD OverviewApiDD Overview
ApiDD Overviewapidd
 
DEVNET-1001 Coding 101: How to Call REST APIs from a REST Client and Python
DEVNET-1001 Coding 101: How to Call REST APIs from a REST Client and PythonDEVNET-1001 Coding 101: How to Call REST APIs from a REST Client and Python
DEVNET-1001 Coding 101: How to Call REST APIs from a REST Client and PythonCisco DevNet
 
vienna.js - Automatic testing of (RESTful) API documentation
vienna.js - Automatic testing of (RESTful) API documentationvienna.js - Automatic testing of (RESTful) API documentation
vienna.js - Automatic testing of (RESTful) API documentationRouven Weßling
 
API Workshop: Deep dive into REST APIs
API Workshop: Deep dive into REST APIsAPI Workshop: Deep dive into REST APIs
API Workshop: Deep dive into REST APIsTom Johnson
 

Similar to Api testing (20)

A Practical Guide to Automating End-to-End API Testing
A Practical Guide to Automating End-to-End API TestingA Practical Guide to Automating End-to-End API Testing
A Practical Guide to Automating End-to-End API Testing
 
Best Practices for Architecting a Pragmatic Web API.
Best Practices for Architecting a Pragmatic Web API.Best Practices for Architecting a Pragmatic Web API.
Best Practices for Architecting a Pragmatic Web API.
 
Creating a World-Class RESTful Web Services API
Creating a World-Class RESTful Web Services APICreating a World-Class RESTful Web Services API
Creating a World-Class RESTful Web Services API
 
2022 APIsecure_Making webhook APIs secure for enterprise
2022 APIsecure_Making webhook APIs secure for enterprise2022 APIsecure_Making webhook APIs secure for enterprise
2022 APIsecure_Making webhook APIs secure for enterprise
 
API Check Overview - Rigor Monitoring
API Check Overview - Rigor MonitoringAPI Check Overview - Rigor Monitoring
API Check Overview - Rigor Monitoring
 
Web Services Testing
Web Services TestingWeb Services Testing
Web Services Testing
 
MuleSoft Surat Virtual Meetup#21 - MuleSoft API and RAML Design Best Practice...
MuleSoft Surat Virtual Meetup#21 - MuleSoft API and RAML Design Best Practice...MuleSoft Surat Virtual Meetup#21 - MuleSoft API and RAML Design Best Practice...
MuleSoft Surat Virtual Meetup#21 - MuleSoft API and RAML Design Best Practice...
 
Do not automate GUI testing
Do not automate GUI testingDo not automate GUI testing
Do not automate GUI testing
 
REST API Basics
REST API BasicsREST API Basics
REST API Basics
 
Restful design at work v2.0
Restful design at work v2.0Restful design at work v2.0
Restful design at work v2.0
 
API Summit 2021: What to know before you start dating APIs.pdf
API Summit 2021: What to know before you start dating APIs.pdfAPI Summit 2021: What to know before you start dating APIs.pdf
API Summit 2021: What to know before you start dating APIs.pdf
 
Selenium API Testing.pdf
Selenium API Testing.pdfSelenium API Testing.pdf
Selenium API Testing.pdf
 
The Top Tips You need to Learn about Data in your Mobile App
The Top Tips You need to Learn about Data in your Mobile AppThe Top Tips You need to Learn about Data in your Mobile App
The Top Tips You need to Learn about Data in your Mobile App
 
What is API test automation
What is API test automation What is API test automation
What is API test automation
 
Webservicex.pdf
Webservicex.pdfWebservicex.pdf
Webservicex.pdf
 
APIs explained for product managers
APIs explained for product managersAPIs explained for product managers
APIs explained for product managers
 
ApiDD Overview
ApiDD OverviewApiDD Overview
ApiDD Overview
 
DEVNET-1001 Coding 101: How to Call REST APIs from a REST Client and Python
DEVNET-1001 Coding 101: How to Call REST APIs from a REST Client and PythonDEVNET-1001 Coding 101: How to Call REST APIs from a REST Client and Python
DEVNET-1001 Coding 101: How to Call REST APIs from a REST Client and Python
 
vienna.js - Automatic testing of (RESTful) API documentation
vienna.js - Automatic testing of (RESTful) API documentationvienna.js - Automatic testing of (RESTful) API documentation
vienna.js - Automatic testing of (RESTful) API documentation
 
API Workshop: Deep dive into REST APIs
API Workshop: Deep dive into REST APIsAPI Workshop: Deep dive into REST APIs
API Workshop: Deep dive into REST APIs
 

More from Keshav Kashyap

Google Analytics Report Automation (Magic)
Google Analytics Report Automation (Magic) Google Analytics Report Automation (Magic)
Google Analytics Report Automation (Magic) Keshav Kashyap
 
Google Analytics Report Automation (Magic Script)
Google Analytics Report Automation (Magic Script)Google Analytics Report Automation (Magic Script)
Google Analytics Report Automation (Magic Script)Keshav Kashyap
 
Google Analytics Report Automation (Magic Script)
Google Analytics Report Automation (Magic Script)Google Analytics Report Automation (Magic Script)
Google Analytics Report Automation (Magic Script)Keshav Kashyap
 

More from Keshav Kashyap (6)

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

Recently uploaded

AI Mastery 201: Elevating Your Workflow with Advanced LLM Techniques
AI Mastery 201: Elevating Your Workflow with Advanced LLM TechniquesAI Mastery 201: Elevating Your Workflow with Advanced LLM Techniques
AI Mastery 201: Elevating Your Workflow with Advanced LLM TechniquesVictorSzoltysek
 
Large-scale Logging Made Easy: Meetup at Deutsche Bank 2024
Large-scale Logging Made Easy: Meetup at Deutsche Bank 2024Large-scale Logging Made Easy: Meetup at Deutsche Bank 2024
Large-scale Logging Made Easy: Meetup at Deutsche Bank 2024VictoriaMetrics
 
WSO2Con2024 - WSO2's IAM Vision: Identity-Led Digital Transformation
WSO2Con2024 - WSO2's IAM Vision: Identity-Led Digital TransformationWSO2Con2024 - WSO2's IAM Vision: Identity-Led Digital Transformation
WSO2Con2024 - WSO2's IAM Vision: Identity-Led Digital TransformationWSO2
 
OpenChain - The Ramifications of ISO/IEC 5230 and ISO/IEC 18974 for Legal Pro...
OpenChain - The Ramifications of ISO/IEC 5230 and ISO/IEC 18974 for Legal Pro...OpenChain - The Ramifications of ISO/IEC 5230 and ISO/IEC 18974 for Legal Pro...
OpenChain - The Ramifications of ISO/IEC 5230 and ISO/IEC 18974 for Legal Pro...Shane Coughlan
 
Shapes for Sharing between Graph Data Spaces - and Epistemic Querying of RDF-...
Shapes for Sharing between Graph Data Spaces - and Epistemic Querying of RDF-...Shapes for Sharing between Graph Data Spaces - and Epistemic Querying of RDF-...
Shapes for Sharing between Graph Data Spaces - and Epistemic Querying of RDF-...Steffen Staab
 
AI & Machine Learning Presentation Template
AI & Machine Learning Presentation TemplateAI & Machine Learning Presentation Template
AI & Machine Learning Presentation TemplatePresentation.STUDIO
 
%in tembisa+277-882-255-28 abortion pills for sale in tembisa
%in tembisa+277-882-255-28 abortion pills for sale in tembisa%in tembisa+277-882-255-28 abortion pills for sale in tembisa
%in tembisa+277-882-255-28 abortion pills for sale in tembisamasabamasaba
 
WSO2CON 2024 - Cloud Native Middleware: Domain-Driven Design, Cell-Based Arch...
WSO2CON 2024 - Cloud Native Middleware: Domain-Driven Design, Cell-Based Arch...WSO2CON 2024 - Cloud Native Middleware: Domain-Driven Design, Cell-Based Arch...
WSO2CON 2024 - Cloud Native Middleware: Domain-Driven Design, Cell-Based Arch...WSO2
 
%+27788225528 love spells in Boston Psychic Readings, Attraction spells,Bring...
%+27788225528 love spells in Boston Psychic Readings, Attraction spells,Bring...%+27788225528 love spells in Boston Psychic Readings, Attraction spells,Bring...
%+27788225528 love spells in Boston Psychic Readings, Attraction spells,Bring...masabamasaba
 
%in Harare+277-882-255-28 abortion pills for sale in Harare
%in Harare+277-882-255-28 abortion pills for sale in Harare%in Harare+277-882-255-28 abortion pills for sale in Harare
%in Harare+277-882-255-28 abortion pills for sale in Hararemasabamasaba
 
call girls in Vaishali (Ghaziabad) 🔝 >༒8448380779 🔝 genuine Escort Service 🔝✔️✔️
call girls in Vaishali (Ghaziabad) 🔝 >༒8448380779 🔝 genuine Escort Service 🔝✔️✔️call girls in Vaishali (Ghaziabad) 🔝 >༒8448380779 🔝 genuine Escort Service 🔝✔️✔️
call girls in Vaishali (Ghaziabad) 🔝 >༒8448380779 🔝 genuine Escort Service 🔝✔️✔️Delhi Call girls
 
WSO2Con2024 - From Code To Cloud: Fast Track Your Cloud Native Journey with C...
WSO2Con2024 - From Code To Cloud: Fast Track Your Cloud Native Journey with C...WSO2Con2024 - From Code To Cloud: Fast Track Your Cloud Native Journey with C...
WSO2Con2024 - From Code To Cloud: Fast Track Your Cloud Native Journey with C...WSO2
 
WSO2CON2024 - It's time to go Platformless
WSO2CON2024 - It's time to go PlatformlessWSO2CON2024 - It's time to go Platformless
WSO2CON2024 - It's time to go PlatformlessWSO2
 
Right Money Management App For Your Financial Goals
Right Money Management App For Your Financial GoalsRight Money Management App For Your Financial Goals
Right Money Management App For Your Financial GoalsJhone kinadey
 
8257 interfacing 2 in microprocessor for btech students
8257 interfacing 2 in microprocessor for btech students8257 interfacing 2 in microprocessor for btech students
8257 interfacing 2 in microprocessor for btech studentsHimanshiGarg82
 
%in Hazyview+277-882-255-28 abortion pills for sale in Hazyview
%in Hazyview+277-882-255-28 abortion pills for sale in Hazyview%in Hazyview+277-882-255-28 abortion pills for sale in Hazyview
%in Hazyview+277-882-255-28 abortion pills for sale in Hazyviewmasabamasaba
 
Architecture decision records - How not to get lost in the past
Architecture decision records - How not to get lost in the pastArchitecture decision records - How not to get lost in the past
Architecture decision records - How not to get lost in the pastPapp Krisztián
 

Recently uploaded (20)

AI Mastery 201: Elevating Your Workflow with Advanced LLM Techniques
AI Mastery 201: Elevating Your Workflow with Advanced LLM TechniquesAI Mastery 201: Elevating Your Workflow with Advanced LLM Techniques
AI Mastery 201: Elevating Your Workflow with Advanced LLM Techniques
 
Large-scale Logging Made Easy: Meetup at Deutsche Bank 2024
Large-scale Logging Made Easy: Meetup at Deutsche Bank 2024Large-scale Logging Made Easy: Meetup at Deutsche Bank 2024
Large-scale Logging Made Easy: Meetup at Deutsche Bank 2024
 
WSO2Con2024 - WSO2's IAM Vision: Identity-Led Digital Transformation
WSO2Con2024 - WSO2's IAM Vision: Identity-Led Digital TransformationWSO2Con2024 - WSO2's IAM Vision: Identity-Led Digital Transformation
WSO2Con2024 - WSO2's IAM Vision: Identity-Led Digital Transformation
 
Microsoft AI Transformation Partner Playbook.pdf
Microsoft AI Transformation Partner Playbook.pdfMicrosoft AI Transformation Partner Playbook.pdf
Microsoft AI Transformation Partner Playbook.pdf
 
OpenChain - The Ramifications of ISO/IEC 5230 and ISO/IEC 18974 for Legal Pro...
OpenChain - The Ramifications of ISO/IEC 5230 and ISO/IEC 18974 for Legal Pro...OpenChain - The Ramifications of ISO/IEC 5230 and ISO/IEC 18974 for Legal Pro...
OpenChain - The Ramifications of ISO/IEC 5230 and ISO/IEC 18974 for Legal Pro...
 
Shapes for Sharing between Graph Data Spaces - and Epistemic Querying of RDF-...
Shapes for Sharing between Graph Data Spaces - and Epistemic Querying of RDF-...Shapes for Sharing between Graph Data Spaces - and Epistemic Querying of RDF-...
Shapes for Sharing between Graph Data Spaces - and Epistemic Querying of RDF-...
 
AI & Machine Learning Presentation Template
AI & Machine Learning Presentation TemplateAI & Machine Learning Presentation Template
AI & Machine Learning Presentation Template
 
%in tembisa+277-882-255-28 abortion pills for sale in tembisa
%in tembisa+277-882-255-28 abortion pills for sale in tembisa%in tembisa+277-882-255-28 abortion pills for sale in tembisa
%in tembisa+277-882-255-28 abortion pills for sale in tembisa
 
WSO2CON 2024 - Cloud Native Middleware: Domain-Driven Design, Cell-Based Arch...
WSO2CON 2024 - Cloud Native Middleware: Domain-Driven Design, Cell-Based Arch...WSO2CON 2024 - Cloud Native Middleware: Domain-Driven Design, Cell-Based Arch...
WSO2CON 2024 - Cloud Native Middleware: Domain-Driven Design, Cell-Based Arch...
 
%+27788225528 love spells in Boston Psychic Readings, Attraction spells,Bring...
%+27788225528 love spells in Boston Psychic Readings, Attraction spells,Bring...%+27788225528 love spells in Boston Psychic Readings, Attraction spells,Bring...
%+27788225528 love spells in Boston Psychic Readings, Attraction spells,Bring...
 
Abortion Pill Prices Tembisa [(+27832195400*)] 🏥 Women's Abortion Clinic in T...
Abortion Pill Prices Tembisa [(+27832195400*)] 🏥 Women's Abortion Clinic in T...Abortion Pill Prices Tembisa [(+27832195400*)] 🏥 Women's Abortion Clinic in T...
Abortion Pill Prices Tembisa [(+27832195400*)] 🏥 Women's Abortion Clinic in T...
 
%in Harare+277-882-255-28 abortion pills for sale in Harare
%in Harare+277-882-255-28 abortion pills for sale in Harare%in Harare+277-882-255-28 abortion pills for sale in Harare
%in Harare+277-882-255-28 abortion pills for sale in Harare
 
call girls in Vaishali (Ghaziabad) 🔝 >༒8448380779 🔝 genuine Escort Service 🔝✔️✔️
call girls in Vaishali (Ghaziabad) 🔝 >༒8448380779 🔝 genuine Escort Service 🔝✔️✔️call girls in Vaishali (Ghaziabad) 🔝 >༒8448380779 🔝 genuine Escort Service 🔝✔️✔️
call girls in Vaishali (Ghaziabad) 🔝 >༒8448380779 🔝 genuine Escort Service 🔝✔️✔️
 
WSO2Con2024 - From Code To Cloud: Fast Track Your Cloud Native Journey with C...
WSO2Con2024 - From Code To Cloud: Fast Track Your Cloud Native Journey with C...WSO2Con2024 - From Code To Cloud: Fast Track Your Cloud Native Journey with C...
WSO2Con2024 - From Code To Cloud: Fast Track Your Cloud Native Journey with C...
 
WSO2CON2024 - It's time to go Platformless
WSO2CON2024 - It's time to go PlatformlessWSO2CON2024 - It's time to go Platformless
WSO2CON2024 - It's time to go Platformless
 
Right Money Management App For Your Financial Goals
Right Money Management App For Your Financial GoalsRight Money Management App For Your Financial Goals
Right Money Management App For Your Financial Goals
 
8257 interfacing 2 in microprocessor for btech students
8257 interfacing 2 in microprocessor for btech students8257 interfacing 2 in microprocessor for btech students
8257 interfacing 2 in microprocessor for btech students
 
%in Hazyview+277-882-255-28 abortion pills for sale in Hazyview
%in Hazyview+277-882-255-28 abortion pills for sale in Hazyview%in Hazyview+277-882-255-28 abortion pills for sale in Hazyview
%in Hazyview+277-882-255-28 abortion pills for sale in Hazyview
 
Architecture decision records - How not to get lost in the past
Architecture decision records - How not to get lost in the pastArchitecture decision records - How not to get lost in the past
Architecture decision records - How not to get lost in the past
 
CHEAP Call Girls in Pushp Vihar (-DELHI )🔝 9953056974🔝(=)/CALL GIRLS SERVICE
CHEAP Call Girls in Pushp Vihar (-DELHI )🔝 9953056974🔝(=)/CALL GIRLS SERVICECHEAP Call Girls in Pushp Vihar (-DELHI )🔝 9953056974🔝(=)/CALL GIRLS SERVICE
CHEAP Call Girls in Pushp Vihar (-DELHI )🔝 9953056974🔝(=)/CALL GIRLS SERVICE
 

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