Geeks With Blogs
Darren Fieldhouse

I need sample / test data all the time. When ever I build an application for a client it is useful for testing and demonstrating, when I teach a course it's always useful to have a demo database on hand (I'm a bit bored of Northwind and Pubs).

Over the years I've collected all sorts of useful sample data, like real surnames, first names and place names. All I've lacked is something to randomly pick from those lists to create a dataset ready to import (in the format I need at the time).

During some free time I had recently I decided to build a generator, but I wanted something really flexable, so what I built uses a template to determine what the output should look like. For example, if all you wanted was a CSV list of names you could do something like this:

{title}, {firstname}, {lastname}

If you wanted to insert those names into a database, then maybe generating the SQL insert statements would be more useful:

INSERT INTO People (Title, FirstName, LastName) VALUES ("{title}", "{firstname}", "{lastname}")

You can also insert numbers, guids, values picked from lists, patterns of characters, greeking text and of course real UK streetnames, towns and counties (with random but real looking postcodes).

If you think this will be as useful to you as it is to me, you can find it here:

http://www.dotnettech.net/Tools/TestData

Edit: Thanks to Eric Nelson for linking to the test data generator, both from the MSDN Flash newsletter and his own blog.

kick it on DotNetKicks.com

Posted on Wednesday, March 4, 2009 12:27 PM | Back to top


Comments on this post: Test and Sample Data

No comments posted yet.
Your comment:
 (will show your gravatar)


Copyright © DarrenFieldhouse | Powered by: GeeksWithBlogs.net | Join free