Forum Discussion
priyapradhan
Occasional Contributor
Yes I am using POST method. Checked the JSON tab also, there also no data. But when I see script log tab I see the results but missing the same in RAW, JSON, XML,Outline tabs
Lucian
6 years agoCommunity Hero
Hi, sorry for the delay. So this should be a working script for obtaining the raw request and response:
// Log the raw request and response def desiredRequest = testRunner.testCase.getTestStepByName("GetGoogle") log.info "The raw request is:" log.info ( new String( desiredRequest.testRequest.messageExchange.rawRequestData ) ) log.info "The raw response is:" log.info ( new String( desiredRequest.testRequest.messageExchange.rawResponseData ) )
You can check the whole project where I created a datasource loop and also logged a count for each iteration at https://github.com/lucadln/soapui/tree/master/ReadyAPI/ResponseFromDifferentTestCase
Let me know if it works for you!
- priyapradhan6 years agoOccasional Contributor
Do I need to add this script in to the events tab. so that it will display me the steps when i run the automation scripts. no changes required in the preferences?