Generate random test data

August 16th, 2007 by mgkimsal Leave a reply »

I put together a small utility to generate random user data several months back. I realized yesterday that I hadn’t released the source code – I thought I had. This generates plausible names, addresses, phone numbers and social security numbers. The phone number area codes don’t generally match up with the address, but the addresses are accurate in that the city/state/zip all match. The addresses are currently US-based only. The code will also generate SQL statements for you to insert directly in to your database if selected.

Have a look at the code in action over at http://www.fosterburgess.com/v2/random.php and click the ‘download source code’ link at the bottom to grab you a copy. If you have any enhancements to share, feel free to send them back and I’ll add them in.

Share and Enjoy:
  • del.icio.us
  • DZone
  • Facebook
  • Reddit
  • StumbleUpon
  • Digg
  • Simpy
  • Technorati
Advertisement

4 comments

  1. gareth_heyes says:

    Excellent work! Thanks for the code, this shall be very handy for some work I’m doing cheers

  2. Dave says:

    Cheers for this , excellent for testing the multiple databases we are learning to build :)

Leave a Reply