Quantcast
Channel: New board topics in SmartBear Community
Viewing all articles
Browse latest Browse all 20755

Is it possible to have a closure in the inline property expansion?

$
0
0

One of the request has following element with property expansion and works perfectly.

<nsSmiley TongueRODUCTID>${=def list = [12, 13,12];list.join(',')}</nsSmiley TongueRODUCTID>

 

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.

 

<nsSmiley TongueRODUCTID>${=def a = (int)(Math.random()*5);def list = [];a.times {list.add((int)(Math.random()*1000))};list.join(',')}</nsSmiley TongueRODUCTID>

 

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


Viewing all articles
Browse latest Browse all 20755

Trending Articles