Forum Discussion
Radford
9 years agoSuper Contributor
The RawRequest is a test step property, thus accessed via getProperty method. Try something like this:
projectRunner.getResults().each(){ testSuiteRunner -> 
	testSuiteRunner.getResults().each() { testCaseRunner ->
		
	 	testCaseRunner.getResults().each() { testStepResult ->
	 	
	 			// Make sure that the test step has properties (not sure if there are any that don't but just being safe).
				if(testStepResult.getTestStep() in com.eviware.soapui.model.TestPropertyHolder){
					log.info('Test step "' + testStepResult.getTestStep().getName() + '" has properties.') 
					// Make sure the test step has a RawRequest property before trying to read it.
					if(testStepResult.getTestStep().hasProperty('RawRequest')){
						log.info('Test step "' + testStepResult.getTestStep().getName() + '" has a RawRequest property.') 
						log.info(testStepResult.getTestStep().getPropertyValue('RawRequest'))
				}
			}
		}
	}
}
Regarding the query about parametrised values, the documentation for the rest request test step states:
- RawRequest - Binary request data. The same content you can see in the Raw view of the request editor without headers. Property expansions are converted to expected values.
 - Request - Request data with unconverted property expansions.
 
If you find your experience is different to this I would log a support call with SmartBear.
ripplegupta
9 years agoContributor
Thanks Radford,
I will check and get back here with confirmation , thanks for your information.