Logging in Rest Assured ( Request Logging ) - Part 1
In the previous post, we learned about Using RequestSpecBuilder in Rest Assured . In this Rest Assured tutorial, we will learn about logging feature provided by Rest Assured. Logging is very useful when you want to know what is send in the request and what you have received in response so that you can create the correct expectations and send the correct requests. After the release of version 1.5, Rest Assured has started supporting logging of details which are sent in the request. Log method of rest assured supports various logging functions. Let us look at them one by one. log().all() : By adding log().all() to the request you’ll receive detailed information what the client sends to the server i.e. all the request specification details like parameters, header and body. log().params() : By adding log().params() to the request you'll receive information about what the client sends in the request parameters. log().body() : By adding log().body() to the r...