Forum Discussion

BTscott's avatar
BTscott
Contributor
6 years ago

Is there a way to parameterize a Groovy step in Soap UI Pro?

Greetings,

 

We are using Soap UI Pro for the first time and would like to know if there is a best practice for re-using a groovy script across multiple test cases. We would like to call a single groovy script and provide different parameter values to get different results.

 

Right now, I am using Groovy to call another Groovy step using the code below:

 

testRunner.testCase.testSuite.getTestCaseByName("[Test Case Name]").getTestStepAt(0).run(testRunner, context);

The issue, however, is that I cannot provide a parameter value to the called step.

 

Any advice would be greatly appreciated.

 

Thank you.