Posts

Showing posts from April, 2020

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");