rajnani
15 years agoOccasional Contributor
Reading the input from previous step
Hi, I have a test case where I invoke a web service and then I have a groovy script where I get the request sent in the previous step and log the message (in soap UI pro 3.0). In the request message I am substituting values for some of the elements with data read from a file. For example
${ReadFromFile#MemberNumber}
This works fine when invoking the webservice ie., values are substituted appropriately. But when I get the request message in the next step (groovy) this value is coming as is i.e., as shown above without substituted values.
I used the following code to read the input message
def testStep = testRunner.testCase.getTestStepByName("RedeemPoints");
def requestMsg = testStep.getProperty ("request");
return requestMsg.value;
Is there any way to get the request message as sent with substituted values. Please let me know.
Thanks
Raj
This works fine when invoking the webservice ie., values are substituted appropriately. But when I get the request message in the next step (groovy) this value is coming as is i.e., as shown above without substituted values.
I used the following code to read the input message
def testStep = testRunner.testCase.getTestStepByName("RedeemPoints");
def requestMsg = testStep.getProperty ("request");
return requestMsg.value;
Is there any way to get the request message as sent with substituted values. Please let me know.
Thanks
Raj