Data Generator

Here’s a handy little script for web developers / QA specialists who need to generate human-related data for use in testing software. This program lets you rapidly build custom test data including names, phone numbers, email addresses, states, provinces and random text of varying size. You may download the information as an excel spreadsheet or view it as HTML. And (naturally), it’s free.

67 Visitor Comments

This is so cool! I think I have a use for this now. I was looking for a simple data generator today and I think yours will help me.

Since I’m still working on my test cases I was wondering if you have or sell a program where by I could keep my data generator setup information. It would be great if I did not have to retype my test data conditions when my requirments change.

Thanks.

ben.keen
November 1, 2006

Hi glo,

Thanks for the comment! I’m afraid there’s no facility for saving your settings just yet, but it’s certainly something I’ve had on the list – so I appreciate the post.

Right now I’m just updating it to allow for minimal control over country-dependent country. Specifically, zip/postal/postcodes and state/province/county information for Canada, UK, US and the Netherlands. I should be finishing that off in the next day or two.

But I agree, saving your settings would be a very useful feature. I’m toying with the idea of designing it to store all your information in the query string, so you can just store setups in browser bookmarks.

Anyway, all the best –

Karthik
November 7, 2006

Hi,

Great work on the tool generator. Just have a look at it. It would be great if the tool allows me to download the test data result in an Excel or a CSV file format. Do expect more feedbacks from me.

Cheers
Karthik

ben.keen
November 11, 2006

Hi Karthik,

Nice idea – csv would be a good addition. I’ll definitely add that in the near future. And actually, it does already support Excel. Just select the Excel option.

Enjoy!

J Doe
November 19, 2006

VERY NICE!!

Manujaya
November 21, 2006

Tool is realy cool. But i cannot create the sql script with date. It’s not genarating. I think page is not opening.

ben.keen
November 22, 2006

Hmmm.. works okay for me. Do you mean the popup page doesn’t appear?

Also, are you sure you’re entering a “format code”? (just select one of the examples for that type for the format code to be auto-generated).

455
December 2, 2006

Fantastic! Well done, and extremely useful.

Fix YourCode
December 2, 2006

spend 10 minutes on creating a query then it reports that Column Names must be alphanumeric…no fucking kidding. I had letter names for all the columns…….

Richard
December 2, 2006

Wow. What a beautiful piece of work. In these times of stolen laptops and heightened security awareness it’s nice to know where I can go to get a customized set of expendable data. I currently do volunteer work with an organization which requires importing data from Microsoft Access into Excel. This effort is required because the database (as designed) is a bear to use. As a result data is being recreated in Word! Ouch! My effort is to bridge the gap with Excel until the database is configured more to the organizations needs.

Although the work is done in Excel, I’ll be using OpenOffice Calc at home because my computer is extremely allergic to Microsoft’s products.

deepb
December 3, 2006

This is a terrific idea. I’ve thrown together Perl scripts to do this sort of thing; however, they weren’t extensible and, as a result, were a headache to update whenever the output format needed to change.

There’s one additional feature that would make this usable for me: an auto-incrementing number starting at zero (or a specified number).

1. “Number Range” should not insert these numbers as strings in MySQL:
Wrong: ‘1’,’2′,…
Correct: 1,2,…

2. Some suggestions for features:
a) add the default format for mysql to your date dropdown: `Y-m-d H:i:s`
b) what about being able to sort the output? I’d personally like to sort these inserts after the `date` column
c) more data types:
I. website (just take http://example.com as base and append something meaningful ;))
II. ip, just four times some numbers from 0 to 256, joined by a dot – not to hard (well don’t think many will a use for this ;))

So long, I think i’ll use this a lot. But: It would be even better, if you could release the source code, this could save you a lot of server bandwidth and I could personally add the features I like to see. Please think about it, you could release it on sourceforge / freshmeat / wherever.

Hannes
December 3, 2006

Very nice, but can you make a downloadable version? I’d love to be able to create 100.000 rows for some heavy performance testing.

One suggestion though… add a datatype for a custom string that I can enter.

My Problem: I’m using PostgreSQL and I need to populate an id field which is an incrementing value tracked by the DB. To insert I need to enter this in the value field: (SELECT nextval(‘clients_id_seq’)).

There’s no way for me to enter in custom values, so I have to output a date range for one day (12/1/2006) and then do a search and replace to get the proper column value.

Other than that, it’s pretty darn sweet. Oh, and I would love an open source version as well or I’d even pay a few bucks for it.

ben.keen
December 3, 2006

Hey guys,

Awesome – thanks for the input. Lots of great suggestions! This is actually pretty overwhelming – and not just for the server.

First thing’s first: I’ll make the script downloadable in the next day or two. Initially I’ll just zip everything up, but I’ll move it to SourceForge once I get a bit more time.

I’ll answer all the comments above when I get home tomorrow.

All the best!

DNB
December 3, 2006

Good job on the program, but here’s a few suggestions:

1) It’d be nice if the postal/zip code information had an option to *actually match* that of the country being randomly generated… not, say, a Canadian postal code for a US country record.

2) It’s a common misconception that Canadian postal codes are simply “Letter-Number-Letter Number-Letter-Number”. NOT ALL LETTERS are used! Only letters ABCEGHJKLMNPRSTVWXYZ are used, because the letters DFIOQ causes problems with optical character recognition of envelopes, so Canada Post does not use them. All ten numeric digits are used. An option for “sloppy postal checking” may, therefore, also be an option… because lots of programmers don’t expect it. :-)

This is very useful. I would love to also be able to generate a second column of data based on the content of the first column. So have a random full name, then have it generate a login name based on that full name for that row. If I have a user name Joseph Smith, then that rows login will be jsmith.

dan
December 5, 2006

You really should add a Paypal donations button on this page. It’s a GREAT tool.

Great tool!…i do some web.development in php (and i could be useful in my spare time wich isnt much)…so if u decide u could use a hand…beep! :) cheers!

Paul
December 7, 2006

Excellent tool.

As mentioned in comment 18, some context-awareness/synchronization would be great. For example, if I output the short state code and the full state name.

It would be great for you to add the generic functionality to allow me to create, for example, a state table. This would require (in addition to the previous point) marking a column as unique. For example if I designated an ST column as unique, I’d get one occurrence of all unique values – all 50 states – as long as I requested at least 50 records.

Also – CSV – YES, but take it a step further and allow me to choose my delimiter. Choose from the usual suspects (comma, tab, space, pipe, etc.) and also let me enter an ASCII code for ultimate flexibility.

Very nice tool.
Would be really useful to me if the 200 row limit was increased to
a couple of thousand.

,Stefan

Jozef
December 19, 2006

Thanks for the tool. The downloadable version was not working on my localhost. It was very strange. HTML, XML and SQL worked. Excel and CSV did not. It took me 20 minutes to find that your program depends on register_globals = ON !!! Very bad PHP coding practise !!!

ben.keen
December 19, 2006

Ack! Thanks Jozef, obviously I agree – it was just an oversight. For some reason my hosting company have left register globals on and I didn’t check it. I’ll fix this up soon and re-post the code. Thanks!

it works fine to Opera, too.
should put it on the browsers list there ;)
great work!

bc
January 19, 2007

Hi,
I love the app. I just dl the lastest version, and installed it on my windows box running xampp. Everything works great except the csv & excel. I saw the comment posed by Jozef, and turned on Register Global, but no luck. Any other reason these exports wouldn’t work?, or has anyone gotten it to work with windows & xampp.

thanks

Muhammad Shuja Qureshi
January 22, 2007

Really a nice tool i will defiantly help. Please introduce the option to accept the schema and then generate the data accordingly.

Export option should be available for Microsoft SQL Server and ORACLE.

Paulius
January 25, 2007

Very useful! Already tried it for my sql database work.
Few suggestions: there could be option to generate time (with the date together).
Generate last names

Good work!!!!

Micheal Kyle
January 30, 2007

I’ll totally going to bookmark this page! This is so useful when your prof wants you to make up a large piece of data and you’re too lazy to do it.

Andrew
February 12, 2007

This seems a really good tool, for testing large application forms – is there any way in which the details entered e.g. column names can be saved, rather than having re-enter every time?

Dave
February 12, 2007

I made some changes to the csv.php. It was outputting an extra $delimiter at the end of each row.

It would be nice if there was an option available to generate data as attribute or node.

Zool
February 20, 2007

I’m having the same issue as bc posted in #37. In this case, I’m running WampServer locally on my laptop. Excel and CSV are not producing an output.

Kayvan Javid
February 25, 2007

Ben,

Fantasitic work, i think you are the only opensource (free) data generator available. I will paypal you a small amount of money, i think you deserve it.

I am having the same issue as Zool in #47, where the EXCEL output is not working, it seems to react by running the excel.php file but has no output or file or such. I too am running WAMP server for what it matters. Do you have any ideas as to why this is the case.

Thanks for the donation! I very much appreciate it. I confess I really don’t know what’s causing the problem you guys are having… possibly the Excel & CSV headers being sent aren’t being understood, though you’d think that would be more likely be due to the browser rather than the OS / server. Sorry, I’m going to have to revisit this problem later when I get a little spare time. Just FYI, I’ll be moving the script to a separate site in the next few months and will start on a number of long-overdue improvements. I’ll investigate this problem then. Sorry it couldn’t be sooner. :-(