How to read JSON File in Rest Assured | How to take Payload from a JSON file in Rest Assured #8

Описание к видео How to read JSON File in Rest Assured | How to take Payload from a JSON file in Rest Assured #8

RestAssured.baseURI ="https://restful-booker.herokuapp.com/";
byte[] input =Files.readAllBytes(Paths.get("test1.json"));
String inputval =new String(input);
//Post API
String postres =
given().
header("Content-Type","application/json")
.body(inputval)
.when().post("/booking")
.then().
log().all().
assertThat().
statusCode(200).
extract().response().asString();

Комментарии

Информация по комментариям в разработке