I'd like to know if there is a way of logging all the calls and responses (url + payload) processed by restassured.
THe finality would be to have a "debug" test log with all the calls and traffic logged.
Of course I could issue calls to the logger in my own code, but I'd prefear to set this behavour globally and not to add logger calls in all my test methods.
Thanks for any pointers
I am posting an example:
Response response = given().
queryParam("apiKey", "abc123").
queryParam("code", code).
queryParam("type", type).
contentType("application/json").
log().all().
when().
get(url).
then().
contentType("application/json").
statusCode(200).
extract().response();
Set log().all() for your response and it will be okay.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With