Forum Discussion
- Ganesh_KalyanamOccasional ContributorHi,
I'm able to retrieve the Raw data by using the below Groovy Script.
Suppose i have a Test Step by Name "Test Request", then
def testReq = testRunner.testCase.getTestStepByName("Test Request").getTestRequest().getResponse().getRawRequestData()
This will return the Raw Data in Array of Bytes(byte[]). To convert it to proper string
def rawData = new String(testReq)
If any one has a better script to fetch the Raw Data, please provide it.
Thanks,
Ganesh - omatzuraSuper ContributorHi!
this looks just fine.. you can make it more "groovy" with
def testReq = testRunner.testCase.testSteps["Test Request"].testRequest.response.rawRequestData
Alternatively you can get it from the corresponding TestStepResult object as described at http://www.eviware.com/blogs/oleblog/?p=442, once you have the result for the "Test Request" step you can use
def testReq = result.rawRequestData
regards!
/Ole
eviware.com - Ganesh_KalyanamOccasional ContributorThanks Ole for the information and suggestion.
Regards,
Ganesh