APITesting
Manual and Automation
What is an API
It is a set of functions or
procedures used by
computer programs to
access operating system
services, software libraries or
other systems.
API – Application Programming Interface
Example of APIWorkflow
•It is the set of functions to
which the developers
perform requests and
receive responses.
•In REST API interaction is
made via HTTP protocol.
REST – Representational StateTransfer
REST API
HTTP Methods
• GET – Provides a read only access to a resource.
• POST – Use to update an existing or create a new resource.
• PUT – Use to create a new resource.
• DELETE – Use to remove a resource.
4 Commonly Used Methods:
APITesting
• Focus on Functionality;
not on behavior or customer experience.
Why APITesting!!!!
Some reasons that we need to do API testing:
• Make sure it does what it suppose to do.
• Make sure it can handle the load
• Find all the way users can mess things up
• Bug Free Deployment
Tools to used for APITesting
Postman SoapUI REST-assured
Postman
GET Method
Response
{
"id": "81901",
"employee_name": "141567018168",
"employee_salary": "123",
"employee_age": "23",
"profile_image": ""
}
Request
http://dummy.restapiexa
mple.com/api/v1/employ
ee/81901
POST Method
Response
{
"name": "Training session",
"salary": "123",
"age": "23",
"id": "86399"
}
Request
http://dummy.restapiexa
mple.com/api/v1/create
{"name":"test","salary":"1
23","age":"23"}
PUT Method
Response
{
"name": "Training session",
"salary": "123",
"age": "35",
"id": "86399"
}
Request
http://dummy.restapiexample.
com/api/v1/update/86399
{"name":“Training session
","salary":"123","age":“35"
}
DELETE Method
Response
{
"success": {
"text": "successfully! deleted
Records"
}
}
Request
http://dummy.restapiexample.
com/api/v1/delete/82155
API
AutomationTesting
How Does Postman work in automate API
testing
•Make a Call.
•Make a SimpleTest
•Schedule(Monitor)
Make A Call
Make A SimpleTest
•Pre Script
•Post Script
Schedule(Monitor)

Api testing