Forum Discussion
annika
14 years agoOccasional Contributor
Hi,
I solved my Problem Like this:
I created a Propertyvalue in the Testsuite. It's a closure in a String.
add='{a,b-> a+b}'
testSuite.addProperty('add')
testSuite.setPropertyValue('add',add)
And it can be used in a Groovyteststep like this
sh = new GroovyShell()
closure = sh.evaluate(context.expand('${#TestSuite#add}'))
return closure('ha','lo')
But there has to be a better Solution. Can I use something like context.createStatement() in the free Version of SoapUI? and How?
I solved my Problem Like this:
I created a Propertyvalue in the Testsuite. It's a closure in a String.
add='{a,b-> a+b}'
testSuite.addProperty('add')
testSuite.setPropertyValue('add',add)
And it can be used in a Groovyteststep like this
sh = new GroovyShell()
closure = sh.evaluate(context.expand('${#TestSuite#add}'))
return closure('ha','lo')
But there has to be a better Solution. Can I use something like context.createStatement() in the free Version of SoapUI? and How?