Forum Discussion
ankitaT
15 years agoContributor
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
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