Generating Random values

How to apply eValid to functional testing of web applications.

Generating Random values

Postby PacMan » Thu Dec 09, 2010 3:30 pm

Is it possible to generate random values in Evalid?

I have to create a .evs script that creates new accounts but it checks for duplicates on the email field. So the first time I run the script it creates an account with an email address of test1@test.com and it runs fine. Any subsequent runs will fail due to an account that already exists with test1@test.com.

I would like eValid to be able generate a random value so I can append it to the email address to always have unique values. Is there a way to make sure I always have a unique email address each time I run this script? It would be nice if I could increment the number by 1 each time I run the script but a random value appended to the email address will work fine too.
PacMan
 
Posts: 8
Joined: Tue Nov 23, 2010 1:46 pm

Re: Generating Random values

Postby eValid » Sun Dec 12, 2010 2:16 pm

PacMan wrote:Is it possible to generate random values in Evalid?

I have to create a .evs script that creates new accounts but it checks for duplicates on the email field. So the first time I run the script it creates an account with an email address of test1@test.com and it runs fine. Any subsequent runs will fail due to an account that already exists with test1@test.com.

I would like eValid to be able generate a random value so I can append it to the email address to always have unique values. Is there a way to make sure I always have a unique email address each time I run this script? It would be nice if I could increment the number by 1 each time I run the script but a random value appended to the email address will work fine too.

For this kind of application, we recommend that you use the eV.Generate capability.

eV.Generate is a kind of pre-processor for your script. With it you can process your script, parameterized to the special formats used by eV.Generate, before you play it back. The preprocessing can involve sequential selections of values from user-defined lists or it can involve random selection from the same kind of lists.

Please consult the eV.Generate section of the eValid documentation, and be sure to contact us (or post here) for answers to any questions you may have.

The eValid Team
eValid
 
Posts: 2396
Joined: Tue Jan 01, 2008 12:48 pm
Location: USA


Return to Desktop and Mobile Device Functional Testing

Design Downloaded from free phpBB templates | free website templates | Free Web Buttons