Forum Discussion
Lucian
Community 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!
priyapradhan
6 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?