catch22
9 years agoOccasional Contributor
Script within DataGen test step
This is an example of one of many small scripts I have within a DataGen test step to generate a single property:
((int)Math.random()*(1999999999-1900000000)+1900000000)
In Ready API 1.4.1
Last value returned: 1918229662 (generates a new random value each time)
In Ready API 1.5.0
Last value returned: 1900000000 (same value returned each time)
Is this a Ready API 1.5.0 bug?
Or perhaps there some setting that I must enable in Ready API 1.5.0 to get the same result?
Hi David,
I’ve got the news from our Team.
In Ready! API 1.5, we moved to Groovy 2.4.4. Precedence of the cast operator was changed in this script version. You need to modify your line with this one:
((int)(Math.random()*(1999999999-1900000000)+1900000000))