Make your DbPro generated test data look better

Few days ago I was tasked to fill database with millions records of data. We have to stress test our application and to define initial SLA. We use DbPro (Visual Studio Database Edition) to maintain our database schemas. Of course, I started with auto-generated strings. Looks terrible….

Terrible generated data.

Next idea was to use my DbPro Generators. Well, it could work for some fields. But… it does not work in my environment (64bit or Visual Studio SPs, I do not know).

Next smart idea was to use data we already have in databases. With data bound generators it could work. But… it is too hard to use. You have to move data, you have to sanitize it. And at the end you need to write queries for each field. Manually!

So pls, welcome the smartest idea! I decided to give a try to Regular Expression Generator. After some cracking of the Regexes, I ended with pretty readable results.

Pretty generated data.

Following is Regex Expressions I used to generate my data. First and Last names are bit Slavonian, but you can contribute them in your language. I will add them to the list.

Goal Regular expression
Email Address (admin|support|test|info|user|[a-z]{3,12})@[a-z]{3,12}((\.com)|(\.net)|(\.co\.uk)|(\.ua))
Website Address ((http|https)://){0,1}www\.[a-z]{3,12}((\.com)|(\.net)|(\.co\.uk)|(\.ua))
Comapany Name ((Power)|(Super)|(Greate)|(Just)) [A-Z][a-z]{3,9} ((LTD)|(Inc)|(Corp))
Last Name [A-Z][a-z]{3,9}(chenko|ko|ov|ev|ns|er|th|il)
First Name (Sachko|Mikhailo|Bogdana|Viktor|Varvara|Neo|Alisa|Mira|Ludmila|[A-Z][a-z]{3,9})
County/Town (London|Kiev|Khrakiv|Paris)
Address [A-Z][a-z]{8,15} ([A-Z][a-z]{8,15}){0,4}( Av| Str){0,1}
Postal Code [0-9]{3,4}-[0-9]{4,5}
Country (UA|UK|AZ|FR)
Telephone Number \+[0-9]{1}([0-9]{3})-[0-9]{3}-[0-9]{4}
Order Number ORD[0-9]{8,8}
Lorem Ipusm (Lorem|A|Amet|Dius)( ipsum){0,1},((a|A|ac|accumsan|bibendum |blandit|conubia|dolor|eni|ipsum|laoreet |lorem|mauris|nunc|odio|senectus|urna|ut|velit|viverra|\.) )*

Enjoy!