Forum Discussion
JHunt
7 years agoCommunity Hero
Try using your context:
context["uuid"] = org.apache.commons.lang.RandomStringUtils.randomNumeric(2)
{ id: "${uuid}" // more json... }
Or even do away with the script altogether and write Groovy inline:
{ id: "${=org.apache.commons.lang.RandomStringUtils.randomNumeric(2)}" // more json... }
- minu_cet7 years agoOccasional Contributor
Hi,
I updated groovy script as
context["uuid"] = org.apache.commons.lang.RandomStringUtils.randomNumeric(2);
Pass the value in another Step as
"email": "test0612201700${uuid}@csp.com",
This runs successfully in SOAPUI Test Case.
But when I run SOAPUI from Java script using below TestCaseRunner the value is not being passed due to which error in the Response.
TestCaseRunner runner = testCase.run(new PropertiesMap(), false);
Am I missing something?
- minu_cet7 years agoOccasional Contributor
It got solved by using
SoapUITestCaseRunner runner = new SoapUITestCaseRunner();
instead of
TestCaseRunner runner = testCase.run(new PropertiesMap(), false);
Related Content
Recent Discussions
- 16 hours agoKLWallace
- 7 days agoruchisingh