Sirisha2020
5 years agoContributor
How to save the request and response in a folder along with time stamp
Hi
I am trying to save the request and response in a folder along with time stamp. I am able to save the response with timestamp. But request is saving with empty file. please find the below code :...
- 5 years ago
Hi Sirisha2020 !
This query involves custom scripting, let's see if what I found would be of help!
This script gets the request data and raw response with headers:
def myRequestStep = testRunner.testCase.getTestStepByName('TestStepName') def GetrequestData = new String(myRequestStep.testRequest.messageExchange.rawRequestData) def GetresponseData = new String(myRequestStep.testRequest.messageExchange.rawResponseData) log.info ("Request = " + GetrequestData) log.info ("Response = " + GetresponseData)
You can try to modify this script to see if that would fit your needs!