Validation testing often needs testing the application with some random numbers & strings of various type & length. Instead of using testing tools we can make use of excel in generating testing data. Excel can be an excellent tool to help in generating random numbers, characters, dates etc. I will try to show some examples about the same.

1. To generate random numbers:

Just type =rand() in an excel cell & hit enter. You can find a random number in the cell. We can make use of this excel formula to generate any number of random numbers. For more random numbers just drag the above cell to whatever length you want.i.e if you want 10 random numbers drag the mouse to 10 cells below the above selected cell & you will get 10 different random numbers.

2. To generate random numbers within a given range

For eg: RANDBETWEEN(100,1000) Here 100 is the lowest range & 1000 is the highest range. This will generate a random number between 100 & 1000. If you want more numbers you can drag the cells as said in the first section

Random Numbers are not enough to test an application. You may need character strings as well. Excel cannot directly create random characters. But you can convert the random numbers to character . Here how it is

This created random numbers between 30 & 60 & converts it into a character. Explore yourself with various values to get different characters.

Now if you want more than one character then use an ‘&’ in between.

For eg:

So like this you can make string of any length you need .

NOTE:

The random number keeps on changing as you do various activities in your excel sheet.So if you want same numbers to remain forever copy them and paste them as said below.

Also please dont forget to use = in front of the formula or else it wont work.

I’ll try to come up with more idea’s for using excel in preparing test data. Keep Exploring!!

**RAND()**Just type =rand() in an excel cell & hit enter. You can find a random number in the cell. We can make use of this excel formula to generate any number of random numbers. For more random numbers just drag the above cell to whatever length you want.i.e if you want 10 random numbers drag the mouse to 10 cells below the above selected cell & you will get 10 different random numbers.

2. To generate random numbers within a given range

**RANDBETWEEN(bottom,top)**For eg: RANDBETWEEN(100,1000) Here 100 is the lowest range & 1000 is the highest range. This will generate a random number between 100 & 1000. If you want more numbers you can drag the cells as said in the first section

**3. To generate random character string**

Random Numbers are not enough to test an application. You may need character strings as well. Excel cannot directly create random characters. But you can convert the random numbers to character . Here how it is

**CHAR(RANDBETWEEN(50,90))**This created random numbers between 30 & 60 & converts it into a character. Explore yourself with various values to get different characters.

Now if you want more than one character then use an ‘&’ in between.

For eg:

**=CHAR(RANDBETWEEN(50,90))&CHAR(RANDBETWEEN(60,90))**can give a value like JC.So like this you can make string of any length you need .

NOTE:

The random number keeps on changing as you do various activities in your excel sheet.So if you want same numbers to remain forever copy them and paste them as said below.

**Edit-> Paste Special->PasteValues**

Also please dont forget to use = in front of the formula or else it wont work.

I’ll try to come up with more idea’s for using excel in preparing test data. Keep Exploring!!