Forum Discussion
Daniel-yip
17 years agoOccasional Contributor
Hi,
Thanks so much. I was try the
def n = (int)(10)
def randomNumber4 =(int)(Math.pow(10,n-1))+(int)(Math.random()*9*(Math.pow(10,n-1)))
def props = testRunner.testCase.getTestStepByName("Properties");
props.setPropertyValue("randomValue4", String.valueOf(randomNumber4))
I find that if the n>=10, the random number is incorrect. Is it exist a limit of properties.
..........
def n = (int)(11)
def randomNumber5 =(int)(Math.pow(10,n-1))
def props = testRunner.testCase.getTestStepByName("Properties");
props.setPropertyValue("randomValue5", String.valueOf(randomNumber5))
If the n is 11, the value of randomNumber5 in properties is 2147483647. How to increase the limit of these properties?
Thanks so much. I was try the
def n = (int)(10)
def randomNumber4 =(int)(Math.pow(10,n-1))+(int)(Math.random()*9*(Math.pow(10,n-1)))
def props = testRunner.testCase.getTestStepByName("Properties");
props.setPropertyValue("randomValue4", String.valueOf(randomNumber4))
I find that if the n>=10, the random number is incorrect. Is it exist a limit of properties.
..........
def n = (int)(11)
def randomNumber5 =(int)(Math.pow(10,n-1))
def props = testRunner.testCase.getTestStepByName("Properties");
props.setPropertyValue("randomValue5", String.valueOf(randomNumber5))
If the n is 11, the value of randomNumber5 in properties is 2147483647. How to increase the limit of these properties?
Related Content
Recent Discussions
- 7 days agoemoya