Forum Discussion
mpunjani
15 years agoOccasional Contributor
Hi Ankita
Thanks for that. It worked
Anyway but the response and request messages starts one after another. How can I automatically press enter after the word 'request' and 'response'?
Thanks
Mak
Thanks for that. It worked

Anyway but the response and request messages starts one after another. How can I automatically press enter after the word 'request' and 'response'?
Thanks
Mak
ankitaT wrote: Hi Mak,
You can add a groovy script step as the last step of ur test case.
Try following code in the groovy script step.
It will create a .txt file.
def filename = "C:\\<filename>.txt"
logFile = new File(fileName)
def request = context.expand("<Your request>")
def response = context.expand("<Your response>")
logFile.append("\nRequest: " + request)
logFile.append("\nResponse: " + response)
//Step 3 and 4 can be also created by right clicking the blank space, selecting "Get data" and then selecting the request.
Regards,
AnkitaT