Forum Stats

  • 3,782,750 Users
  • 2,254,684 Discussions


How to use regular expressions to generate test data ?

643633 Member Posts: 9
edited Jul 1, 2008 12:20PM in QA/Testing

Someone can help me on what I have to do in order to create test data with regular expressions ?

For example, I want to introduce a random telephone number (XXX-XXXX) in the phone number Form Field, I want to create the phone number using regular expressions in order to test different values in each playback of the script.

I don't want to use VB or vbscript in e-tester, I'm just trying to do this with e-load nav editor and e-load

Thanks a lot


  • 644542
    644542 Member Posts: 6
    I know you mentioned not wanting to use VB, and perhaps this is due to the client type you are using for ELoad, or you don't want the overhead of the VB running in ELoad...

    Having said that, perhaps you could write some VB that generates however many random phone numbers you'd like, written to a CSV file which you could then use as a databank for your script. I use this trick often - I write some function in my shared modules VB area in ETester and execute it standalone in the VB IDE to write a file of random data I can then map to my script - which itself will use no VB.
  • 643633
    643633 Member Posts: 9
    Hi and thanks for your answer!, it's a great trick ^_^

    I'm doing a research on how to improve the execution speed of the scripts in e-load, so actually I'm trying to avoid the use of databanks and VB code also.

    I was expecting that maybe e-load, e-load nav editor or e-tester can automatically generate test data via Regular Expressions. Someone Knows if this is possible ?

    Also can anyone tell me what the option "Automatically Generated (complex)" means ? I think that this will help me a lot

    *you can find this option in e-load Nav Editor when you select a parameter in the tree view, then go to the "type" listbox in the properties pane, there you will find this option and some more options like :"Databanked variable", "Custom Dynamic Value", "Function".. etc.

    Thanks again
This discussion has been closed.