Script within DataGen test step
SOLVED- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
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?
Solved! Go to Solution.
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi Catch22,
Could you please check if you see the same behavior in our latest Ready! API maintenance build? Perhaps, this issue has already been fixed there.
You can download the build here: https://support.smartbear.com/downloads/readyapi/nightly-builds/
Tanya Yatskovskaya
SmartBear Community and Education Manager
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
I ran the test on a nightly build of Ready API 1.5.0 downloaded this morning 2016-01-28.
I also ran the test on the Ready API 1.5.0 "public" build.
Same result on both.
Thanks
David
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Thanks for checking.
I’ve reported this behavior to our R&D Team. Let’s wait for the results of their investigation.
Tanya Yatskovskaya
SmartBear Community and Education Manager
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
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))
Tanya Yatskovskaya
SmartBear Community and Education Manager
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Thanks! That fixed the issue
