Posts

Showing posts from August, 2023

Rest Assured

download dependecny  org.testng:testng io.restassured  ---------------------------------------------------------------------------- Response response = RestAssured.given().when().get("posts").then().extract().response(); String value =  response.jsonPath().getList("title").get(0).toString(); System.out.println(value); ---------------------------------------------------------------------------- Authentication          given().auth().basic("","");         given().auth().digest("","");         given().auth().preemptive().basic("","");         given().auth().oauth2("access token");         given().header("Authorization","Bearer "+"sdasdasdsadas");         given().queryParam("",""); ---------------------------------------------------------------------------- given() contentType, set cookies, add auth, param, set headsers  when() get, post,put,delete...