Forum Discussion

ayushgoelg's avatar
ayushgoelg
New Contributor
15 years ago

Logs for request and response

Hi,

I am using soapUI 3.5.1 version.

Is there any log which logs complete request and response?

Please provide me location where could i found such log. And If it is configurable, then also tell the procedure for the same

Thanks,
Ayush Goel

1 Reply

  • Hi Ayush,

    You can write logs for request response in a text file using a simple groovy code.
    Add a groovy test step as the last step of your test case and write the following code.

    def fileName = "C:\\logs.txt"
    logFile = new File(fileName)

    def request = context.expand("Your Request")
    def response = context.expand("Your Response")

    logFile.append("Request: " + request + "\n")
    logFile.append("Response: " + response + "\n")




    Hope that helps..

    Thanks,
    Ankita