Forum Discussion
- HimanshuTayalCommunity Hero
Hi lgermain315
Just write down below code in groovy script and you will get RawRequest Data
def getRequestData = new String(getRequestTestStep.testRequest.messageExchange.rawRequestData) log.info getRequestData
For GET Type Request RawRequest is empty and there is no such setting i have found till now by which we can get the RawRequest for GET Type.
Do like and accept if you find it as solution!!
Thanks,
Himanshu
- aaronpliuFrequent Contributor
after your step running and then you can get RawRequest from property
def rawRequest = context.expand('${#YourStepName#RawRequest}')
"Get data" shortcut also can retrieve RawRequest
${YourStepName#RawRequest}
Regards,
/Aaron
- HimanshuTayalCommunity Hero
Hi aaronpliu
But if you are working with RESTful and method is GET, in that case RawRequest is not available.
In any other scenario it will work fine.
Thanks,
Himanshu Tayal
- lgermain315Occasional Contributor
Hi,
Thanks for your feedback, however these seem to be work arounds for the problem. The original functionality that was in place seems to have been broken.
Here's another video that shows the desired behavior:
https://www.screencast.com/t/CKKqCa3vXQu
UPDATE:
I found that my request object had 1 trailing comma which caused the json to be invalid. Version 2.2 ignored this comma and version 2.4 does not and writes an error to the log. Once that comma was removed, the 'RawRequest' dialog showed up and worked as expected.
However, there are still issues using "Select Content" drop-down within the asserion dialog. I will not use this anymore. Instead use the right-click context menu "Get Data" and use that dialog to achieve the desired results.
Related Content
Recent Discussions
- 21 days ago