cancel
Showing results for 
Search instead for 
Did you mean: 

While doing automation in ReadyApi, all test steps passed, but no raw request data

Highlighted
Community Hero

Re: While doing automation in ReadyApi, all test steps passed, but no raw request data

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!



If my answer helped please click on the 'Accept as Solution' button.
Highlighted
Occasional Contributor

Re: While doing automation in ReadyApi, all test steps passed, but no raw request data

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?

Highlighted
Community Hero

Re: While doing automation in ReadyApi, all test steps passed, but no raw request data

Just download the project from giithub and check it out. I don't have access to a computer right now.


If my answer helped please click on the 'Accept as Solution' button.
New Here?
Join us and watch the welcome video:
Announcements
Top Kudoed Authors