Forum Discussion
- Radford8 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.
- ripplegupta8 years agoContributor
Thanks Radford,
I will check and get back here with confirmation , thanks for your information.
- ripplegupta8 years agoContributor
Hi thanks Radford, i was able to get raw request with property expansion.
but properties like query, header and template are not giving data after property expanison, can you help here ?
- Radford8 years agoSuper Contributor
Sorry, never had to do this myself I don't think I can really help further. Try looking at the JavaDocs for the Classes:
They may be of some help to you, it's probably where I would start investigating.
Please post back here if you find a solution.
Related Content
- 2 years agopstachelek