reduce logging

This commit is contained in:
René Zubcevic
2019-07-25 10:59:37 +02:00
committed by Nanne Baars
parent ffbc808e26
commit d2e23f6b8e

View File

@ -42,9 +42,11 @@ public class General_TestHelper extends TestHelper {
startLesson(cookie, webgoatURL, "HttpProxies"); startLesson(cookie, webgoatURL, "HttpProxies");
assertThat(given() assertThat(given()
.when().config(restConfig).cookie("JSESSIONID", cookie).header("x-request-intercepted", "true") .when().config(restConfig).cookie("JSESSIONID", cookie).header("x-request-intercepted", "true")
.contentType(ContentType.JSON).log().all() .contentType(ContentType.JSON)
//.log().all()
.get(webgoatURL + "/WebGoat/HttpProxies/intercept-request?changeMe=Requests are tampered easily").then() .get(webgoatURL + "/WebGoat/HttpProxies/intercept-request?changeMe=Requests are tampered easily").then()
.log().all().statusCode(200).extract().path("lessonCompleted"), is(true)); //.log().all()
.statusCode(200).extract().path("lessonCompleted"), is(true));
checkResults(cookie, webgoatURL, "/HttpProxies/"); checkResults(cookie, webgoatURL, "/HttpProxies/");
@ -85,9 +87,11 @@ public class General_TestHelper extends TestHelper {
startLesson(cookie, webgoatURL, "HttpProxies"); startLesson(cookie, webgoatURL, "HttpProxies");
assertThat(given().when().config(restConfig).cookie("JSESSIONID", cookie).header("x-request-intercepted", "true") assertThat(given().when().config(restConfig).cookie("JSESSIONID", cookie).header("x-request-intercepted", "true")
.contentType(ContentType.JSON).log().all() .contentType(ContentType.JSON)
//.log().all()
.get(webgoatURL + "/WebGoat/HttpProxies/intercept-request?changeMe=Requests are tampered easily").then() .get(webgoatURL + "/WebGoat/HttpProxies/intercept-request?changeMe=Requests are tampered easily").then()
.log().all().statusCode(200).extract().path("lessonCompleted"), is(true)); //.log().all()
.statusCode(200).extract().path("lessonCompleted"), is(true));
checkResults(cookie, webgoatURL, "/HttpProxies/"); checkResults(cookie, webgoatURL, "/HttpProxies/");
} }