Can we do parameterization using groovy scripts?

Questions by sathyaageetha

  
Showing Answers 1 - 3 of 3 Answers

Yes, You can parametrization using groovy scripts,
in groovy script you must declare the variables to pass the mocservice response accordingly.
See example for better understand:
-------------------------------------------------

Code
  1. def groovyUtils=new com.eviware.soapui.support.GroovyUtils(context)

  2. def holder=groovyUtils.getXmlHolder(mockRequest.requestContent)

  3. def asset=holder.getNodevalue("//homepage/credit");

  4. def asset=holder.getNodevalue("//homepage/debit""90828882""sample1""sample2"

  5. }

  Was this answer useful?  Yes

Ellakkiya

  • May 6th, 2013
 

Yes. You can parametrize a variable for a Testcase, Testsuite and Project using the following code..

This will set the parameters msg, msgID in ur testcase u created.

Code
  1. span style="color: #ff0000;">"msg""msgId",msgId)


  Was this answer useful?  Yes

Ellakkiya

  • May 6th, 2013
 

Yes. You can parametrize the variable for Testcase, Testsuite, Project by using Groovy script

Code
  1. span style="color: #ff0000;">"msgUuid""msgId",msgId)

  Was this answer useful?  Yes

Give your answer:

If you think the above answer is not correct, Please select a reason and add your answer below.

 

Related Answered Questions

 

Related Open Questions