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

How to Automate API Testing
How to Automate API TestingHow to Automate API Testing
How to Automate API TestingBruno Pedro
 
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 Test Automation
API Test Automation API Test Automation
API Test Automation SQALab
 
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
 
4 Major Advantages of API Testing
4 Major Advantages of API Testing4 Major Advantages of API Testing
4 Major Advantages of API TestingQASource
 
REST API Design & Development
REST API Design & DevelopmentREST API Design & Development
REST API Design & DevelopmentAshok Pundit
 
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
 
Test in Rest. API testing with the help of Rest Assured.
Test in Rest. API testing with the help of  Rest Assured.Test in Rest. API testing with the help of  Rest Assured.
Test in Rest. API testing with the help of Rest Assured.Artem Korchevyi
 
What is REST API? REST API Concepts and Examples | Edureka
What is REST API? REST API Concepts and Examples | EdurekaWhat is REST API? REST API Concepts and Examples | Edureka
What is REST API? REST API Concepts and Examples | EdurekaEdureka!
 
Web automation using selenium.ppt
Web automation using selenium.pptWeb automation using selenium.ppt
Web automation using selenium.pptAna Sarbescu
 
Accelerate Quality with Postman - Basics
Accelerate Quality with Postman - BasicsAccelerate Quality with Postman - Basics
Accelerate Quality with Postman - BasicsKnoldus Inc.
 

What's hot (20)

How to Automate API Testing
How to Automate API TestingHow to Automate API Testing
How to Automate API Testing
 
Api testing
Api testingApi testing
Api testing
 
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 Test Automation
API Test Automation API Test Automation
API Test Automation
 
Postman.ppt
Postman.pptPostman.ppt
Postman.ppt
 
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
 
Rest assured
Rest assuredRest assured
Rest assured
 
4 Major Advantages of API Testing
4 Major Advantages of API Testing4 Major Advantages of API Testing
4 Major Advantages of API Testing
 
REST API Design & Development
REST API Design & DevelopmentREST API Design & Development
REST API Design & Development
 
Api Testing
Api TestingApi Testing
Api Testing
 
Postman
PostmanPostman
Postman
 
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
 
Test in Rest. API testing with the help of Rest Assured.
Test in Rest. API testing with the help of  Rest Assured.Test in Rest. API testing with the help of  Rest Assured.
Test in Rest. API testing with the help of Rest Assured.
 
API TESTING
API TESTINGAPI TESTING
API TESTING
 
What is REST API? REST API Concepts and Examples | Edureka
What is REST API? REST API Concepts and Examples | EdurekaWhat is REST API? REST API Concepts and Examples | Edureka
What is REST API? REST API Concepts and Examples | Edureka
 
Web automation using selenium.ppt
Web automation using selenium.pptWeb automation using selenium.ppt
Web automation using selenium.ppt
 
API for Beginners
API for BeginnersAPI for Beginners
API for Beginners
 
Introduction to Selenium Web Driver
Introduction to Selenium Web DriverIntroduction to Selenium Web Driver
Introduction to Selenium Web Driver
 
POSTMAN.pptx
POSTMAN.pptxPOSTMAN.pptx
POSTMAN.pptx
 
Accelerate Quality with Postman - Basics
Accelerate Quality with Postman - BasicsAccelerate Quality with Postman - Basics
Accelerate Quality with Postman - Basics
 

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.
 
REST API testing with SpecFlow
REST API testing with SpecFlowREST API testing with SpecFlow
REST API testing with SpecFlowAiste Stikliute
 
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 .
 
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)
 
REST API testing with SpecFlow
REST API testing with SpecFlowREST API testing with SpecFlow
REST API testing with SpecFlow
 
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
 
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

Software Quality Assurance Interview Questions
Software Quality Assurance Interview QuestionsSoftware Quality Assurance Interview Questions
Software Quality Assurance Interview QuestionsArshad QA
 
why an Opensea Clone Script might be your perfect match.pdf
why an Opensea Clone Script might be your perfect match.pdfwhy an Opensea Clone Script might be your perfect match.pdf
why an Opensea Clone Script might be your perfect match.pdfjoe51371421
 
Diamond Application Development Crafting Solutions with Precision
Diamond Application Development Crafting Solutions with PrecisionDiamond Application Development Crafting Solutions with Precision
Diamond Application Development Crafting Solutions with PrecisionSolGuruz
 
DNT_Corporate presentation know about us
DNT_Corporate presentation know about usDNT_Corporate presentation know about us
DNT_Corporate presentation know about usDynamic Netsoft
 
How To Use Server-Side Rendering with Nuxt.js
How To Use Server-Side Rendering with Nuxt.jsHow To Use Server-Side Rendering with Nuxt.js
How To Use Server-Side Rendering with Nuxt.jsAndolasoft Inc
 
Salesforce Certified Field Service Consultant
Salesforce Certified Field Service ConsultantSalesforce Certified Field Service Consultant
Salesforce Certified Field Service ConsultantAxelRicardoTrocheRiq
 
Clustering techniques data mining book ....
Clustering techniques data mining book ....Clustering techniques data mining book ....
Clustering techniques data mining book ....ShaimaaMohamedGalal
 
Hand gesture recognition PROJECT PPT.pptx
Hand gesture recognition PROJECT PPT.pptxHand gesture recognition PROJECT PPT.pptx
Hand gesture recognition PROJECT PPT.pptxbodapatigopi8531
 
Optimizing AI for immediate response in Smart CCTV
Optimizing AI for immediate response in Smart CCTVOptimizing AI for immediate response in Smart CCTV
Optimizing AI for immediate response in Smart CCTVshikhaohhpro
 
The Real-World Challenges of Medical Device Cybersecurity- Mitigating Vulnera...
The Real-World Challenges of Medical Device Cybersecurity- Mitigating Vulnera...The Real-World Challenges of Medical Device Cybersecurity- Mitigating Vulnera...
The Real-World Challenges of Medical Device Cybersecurity- Mitigating Vulnera...ICS
 
A Secure and Reliable Document Management System is Essential.docx
A Secure and Reliable Document Management System is Essential.docxA Secure and Reliable Document Management System is Essential.docx
A Secure and Reliable Document Management System is Essential.docxComplianceQuest1
 
Test Automation Strategy for Frontend and Backend
Test Automation Strategy for Frontend and BackendTest Automation Strategy for Frontend and Backend
Test Automation Strategy for Frontend and BackendArshad QA
 
5 Signs You Need a Fashion PLM Software.pdf
5 Signs You Need a Fashion PLM Software.pdf5 Signs You Need a Fashion PLM Software.pdf
5 Signs You Need a Fashion PLM Software.pdfWave PLM
 
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
 
SyndBuddy AI 2k Review 2024: Revolutionizing Content Syndication with AI
SyndBuddy AI 2k Review 2024: Revolutionizing Content Syndication with AISyndBuddy AI 2k Review 2024: Revolutionizing Content Syndication with AI
SyndBuddy AI 2k Review 2024: Revolutionizing Content Syndication with AIABDERRAOUF MEHENNI
 
TECUNIQUE: Success Stories: IT Service provider
TECUNIQUE: Success Stories: IT Service providerTECUNIQUE: Success Stories: IT Service provider
TECUNIQUE: Success Stories: IT Service providermohitmore19
 

Recently uploaded (20)

Software Quality Assurance Interview Questions
Software Quality Assurance Interview QuestionsSoftware Quality Assurance Interview Questions
Software Quality Assurance Interview Questions
 
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
 
why an Opensea Clone Script might be your perfect match.pdf
why an Opensea Clone Script might be your perfect match.pdfwhy an Opensea Clone Script might be your perfect match.pdf
why an Opensea Clone Script might be your perfect match.pdf
 
Diamond Application Development Crafting Solutions with Precision
Diamond Application Development Crafting Solutions with PrecisionDiamond Application Development Crafting Solutions with Precision
Diamond Application Development Crafting Solutions with Precision
 
DNT_Corporate presentation know about us
DNT_Corporate presentation know about usDNT_Corporate presentation know about us
DNT_Corporate presentation know about us
 
How To Use Server-Side Rendering with Nuxt.js
How To Use Server-Side Rendering with Nuxt.jsHow To Use Server-Side Rendering with Nuxt.js
How To Use Server-Side Rendering with Nuxt.js
 
Salesforce Certified Field Service Consultant
Salesforce Certified Field Service ConsultantSalesforce Certified Field Service Consultant
Salesforce Certified Field Service Consultant
 
Clustering techniques data mining book ....
Clustering techniques data mining book ....Clustering techniques data mining book ....
Clustering techniques data mining book ....
 
Hand gesture recognition PROJECT PPT.pptx
Hand gesture recognition PROJECT PPT.pptxHand gesture recognition PROJECT PPT.pptx
Hand gesture recognition PROJECT PPT.pptx
 
Microsoft AI Transformation Partner Playbook.pdf
Microsoft AI Transformation Partner Playbook.pdfMicrosoft AI Transformation Partner Playbook.pdf
Microsoft AI Transformation Partner Playbook.pdf
 
Optimizing AI for immediate response in Smart CCTV
Optimizing AI for immediate response in Smart CCTVOptimizing AI for immediate response in Smart CCTV
Optimizing AI for immediate response in Smart CCTV
 
The Real-World Challenges of Medical Device Cybersecurity- Mitigating Vulnera...
The Real-World Challenges of Medical Device Cybersecurity- Mitigating Vulnera...The Real-World Challenges of Medical Device Cybersecurity- Mitigating Vulnera...
The Real-World Challenges of Medical Device Cybersecurity- Mitigating Vulnera...
 
A Secure and Reliable Document Management System is Essential.docx
A Secure and Reliable Document Management System is Essential.docxA Secure and Reliable Document Management System is Essential.docx
A Secure and Reliable Document Management System is Essential.docx
 
Test Automation Strategy for Frontend and Backend
Test Automation Strategy for Frontend and BackendTest Automation Strategy for Frontend and Backend
Test Automation Strategy for Frontend and Backend
 
5 Signs You Need a Fashion PLM Software.pdf
5 Signs You Need a Fashion PLM Software.pdf5 Signs You Need a Fashion PLM Software.pdf
5 Signs You Need a Fashion PLM Software.pdf
 
Exploring iOS App Development: Simplifying the Process
Exploring iOS App Development: Simplifying the ProcessExploring iOS App Development: Simplifying the Process
Exploring iOS App Development: Simplifying the Process
 
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 🔝✔️✔️
 
SyndBuddy AI 2k Review 2024: Revolutionizing Content Syndication with AI
SyndBuddy AI 2k Review 2024: Revolutionizing Content Syndication with AISyndBuddy AI 2k Review 2024: Revolutionizing Content Syndication with AI
SyndBuddy AI 2k Review 2024: Revolutionizing Content Syndication with AI
 
Vip Call Girls Noida ➡️ Delhi ➡️ 9999965857 No Advance 24HRS Live
Vip Call Girls Noida ➡️ Delhi ➡️ 9999965857 No Advance 24HRS LiveVip Call Girls Noida ➡️ Delhi ➡️ 9999965857 No Advance 24HRS Live
Vip Call Girls Noida ➡️ Delhi ➡️ 9999965857 No Advance 24HRS Live
 
TECUNIQUE: Success Stories: IT Service provider
TECUNIQUE: Success Stories: IT Service providerTECUNIQUE: Success Stories: IT Service provider
TECUNIQUE: Success Stories: IT Service provider
 

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