i am currently using the RestClient and cannot seem to figure out how to output the request xml and response xml for debugging and informational purpose...
I tried the solution mentioned here: http://agileice.blogspot.com/2009/09/pretty-printing-xml-results-returned.html
But that fails to work, any other suggestions?
Open groovy script > Right click > Get data > Select the test case step which has the API call > Select request/response etc.
Get the Places connection to execute the HTTP GET request on this resource and pass the text entered in the EmployeeAddress RTP as the value for the input query parameter. The Places connection object is a communication link between the Groovy script and the Google Places REST API resource.
The accepted answer (turn on wire logging using log4j) is basically correct, but I've had a fair bit of trouble turning on wire logging for HTTP builder in my Groovy script. For some reason, dropping a log4j.xml file in my $GROOVY_HOME/conf directory isn't working. Ultimately, I had to just add the appropriate logging options to the groovy command when I was running it.
groovy
-Dorg.apache.commons.logging.Log=org.apache.commons.logging.impl.SimpleLog
-Dorg.apache.commons.logging.simplelog.showdatetime=true
-Dorg.apache.commons.logging.simplelog.log.org.apache.http=DEBUG
myscript.groovy
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