Posts

RestAssured

Image
RestAssured is used to test the API, following are the dependencies that we would lead to test the API using restassured. Dependencies needed are  restassured and JSONsample.  Following are the classes and methods we have in  restassured. RestAssured.baseuri=""; Requestsequential httprequest= RestAssured.given(); JSONobject obj = new JSONobject; obj.put("",""); httprequest.headers(obj,ToJSONstring()); Response response=httprequest.request(Method.GET, <rest of the uri>) .body response.body().toString response.statuscode() response.jasonpath().get("attribute");

Testing using Postman

Postman is for REST API Postman acts like client for webservice testing web services acts as mediator between client and server, we can hit web services from browser also but to test web service we will need postman url (end point)= domain + uri domain is www.google.com uri = request type (unified request in HTTP requests methods: POST, GET, Delete, put

Steps to install Postman and use it

Two formats: Plugin ( chrome://apps/ ) Installable file .exe (for jenkins, test scripts)