I have a test for one operation which has one input parameter and it takes 11 digit number. Can you please provide me a testscript which generates any random 11 digit number for input field. Thanks LeapTester

Here is the script for generating random 11 digit sequences.

CODE

from java.util import *

def myRandom(): rand = Random(); # Make sure first digit is not zero ret = str(rand.nextInt(9) + 1); index = 0; while index < 10: ret = ret + str(rand.nextInt(10)); index = index + 1; return ret

I assumed that the first digit cannot be zero. If that is the wrong assumption, please change the while loop to run 11 times instead of 10 and change

## Comments

1,669✭✭Here is the script for generating random 11 digit sequences.

`from java.util import *`

def myRandom():

rand = Random();

# Make sure first digit is not zero

ret = str(rand.nextInt(9) + 1);

index = 0;

while index < 10:

ret = ret + str(rand.nextInt(10));

index = index + 1;

return ret

I assumed that the first digit cannot be zero. If that is the wrong assumption, please change the while loop to run 11 times instead of 10 and change

CODE

`ret = str(rand.nextInt(9) + 1);`

to

ret = '' # 2 single quotes