We are going through our second round of testing some critical business flows in our test lab when it dawned on me how much we use the following NumberGenerator code. We use it for almost every step of data creation...ok, not that much, but ALOT. Its kinda goofy, but there you have it. Its used in many of our scenarios where we are initially seeding data. e.g. Purchase Order numbers, Work Order numbers, Pallet numbers, or anywhere else we need a sequence of numbers that are formatted with a specific pre/post fix, padded with a specific character to a fixed length and so forth.
I'm not making any claims around it...just it was one of those moments where I reflected on the value of this little piece of code. Of course, anyone could have cranked out the same piece of code a dozen different ways, using different tools, but we did it this way. Anyway...I'm through reflecting..
How do you generate test data?