API Automation
- Used jayway restassured to automate api
- Get: get is used to fetch the data
- Post:In post we are adding new entry
- Put: In Put we are updating entry, if in put u are sending only entry (in body) which needs to be updated then it is going to update that entry and will remove others so to overcome this we use patch
- Patch: Patch is used just to update data. With patch we only send data in body which needs upfation
- Delete: It removes record
-- Get is the read only method whereas put , post and delete are write methods.
-- Get,Put and Delete are idempotent, we can safely repeat them as many times but post is non idempotent and we should not repeat it. We can understand it this way suppose we accessed a webpage then we can without any problem refresh it.Its a get request for server but suppose we are filling a form and after filling if we try to refresh the browser will warn us saying u have already submitted , r u sure ..? like this 'cause this will be a duplicate request for browser.
Options Method: gives us details of allowed method, which all methods server accepts
SOAP: Simple object access protocol and it can interact with other programming language applications(means language and plateform independent)
Advantages:
--It has its own security known as WS Security
--Language and plateform independent
Disadvantages:
1-It supports only xml format and it is slow because it has to follow many standards
2-It works with WSDL(Web Service Description Language and its written only in form of xml) file only , no othere formats like json is accepted
Restful Webservices
It stands for Representational State Transfer
It is plateform dependent
It supports multiple formats like json,text,html,xml etc
It is fast as compared to soap
It is an architectural design not protocol like soap
Responce codes
1XX--info
2XX--success
3XX--redirection
4XX--client error
5XX--server error
Refrence is : https://www.youtube.com/watch?v=-W41NVeb7UM&index=2&list=PLmfZ8pjwM0vTVzGG5v0CrWxJaeHPP1KvH
No comments:
Post a Comment