nmrao
9 years agoChampion Level 3
Is it possible to have a closure in the inline property expansion?
One of the request has following element with property expansion and works perfectly.
<ns:PRODUCTID>${=def list = [12, 13,12];list.join(',')}</ns:PRODUCTID>
However, the below property expansion, which has closure inside of it, leads to syntax errors though it is correct. I was trying to create dynamic comma separated string on each execution.
<ns:PRODUCTID>${=def a = (int)(Math.random()*5);def list = [];a.times {list.add((int)(Math.random()*1000))};list.join(',')}</ns:PRODUCTID>
I would like to check with SmartBear team if this is any way an issue in SoapUI? or is the problem coming to soapUI from out side i.e., from groovy source?
The version I have tried is in 4.5.1.
Note: this is also published earlier here