Hi, recently i started learning rest assured and I encounter strange behaviour.
Basically I created request to create boards with default param on defaultLists = true, then added another request to read from board and finally simple print to see response - every time on single print I get two identical prints of two list containing same items.
String boardName = "Board without lists";
Response creationResponse = given()
.queryParam("key", key)
.queryParam("token", token)
.queryParam("name", boardName)
.queryParam("defaultLists", true)
.contentType(ContentType.JSON)
.when()
.post(url)
.then()
.statusCode(HttpStatus.SC_OK)
.extract()
.response();
JsonPath jPathPost = creationResponse.jsonPath();
idBoard = jPathPost.get("id");
Assertions.assertEquals(boardName, jPathPost.get("name"));
Response getResponse = given()
.queryParam("key", key)
.queryParam("token", token)
.contentType(ContentType.JSON)
.when()
.get(url + "/" + idBoard + "/lists")
.then()
.statusCode(HttpStatus.SC_OK)
.extract()
.response();
System.out.print(getResponse.print());
Any idea why on console I receive two same lists? Checked on postman with same request and i got normal response with one list.
Thanks in advance!
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.