Generate Random Data CFBuilder Extension

This post is more than 2 years old.

I just released (at RIAForge naturally: a new ColdFusion Builder Extension: Generate Random Data. The idea behind the extension is simple. Many times I have need of a ColdFusion query, but don't have the actual data itself. I may be building a service component, or perhaps writing a simple test for a blog entry. I typically do something like so:

<cfset q = queryNew("id,name")> <cfloop index="x" from="1" to="10"> <cfset queryAddRow(q)> <cfset querySetCell(q, "id", x)> <cfset querySetCell(q, "name", "Random X")> </cfloop>

And while this "works", I had a hunch ColdFusion Builder would allow me to do it even quicker. With that idea in mind, I quickly whipped up the following extension. Click the image below to watch a quick video:

The extension makes use of both jQuery and the jQuery Validation library. Right now it's pretty simple. You can generate queries with random names, random numbers, random values from a list, and random booleans. If folks have ideas on how to extend this, just file an enhancement request at the RIAForge project.

So.... useful?

Raymond Camden's Picture

About Raymond Camden

Raymond is a senior developer evangelist for Adobe. He focuses on document services, JavaScript, and enterprise cat demos. If you like this article, please consider visiting my Amazon Wishlist or donating via PayPal to show your support. You can even buy me a coffee!

Lafayette, LA

Archived Comments

Comment 1 by todd sharp posted on 6/28/2010 at 10:05 PM

That rules dude.

Comment 2 by Raymond Camden posted on 6/28/2010 at 10:10 PM

What's really kinda rocking for me is - I keep running into little tools that _I_ need, and I can just add them. It's like a CFBuilder tuned just for myself. ;)

Comment 3 by Kevin Benore posted on 6/28/2010 at 10:39 PM

Ray, maybe you could do a commercial .... "ColdFusion Builder was my idea!" Errr, maybe not.

Comment 4 by Guust Nieuwenhuis posted on 6/28/2010 at 10:44 PM

Ray, super extension!

some feedback:
- Take a look at the types used by maybe you'll find some ideas for extra types over there.
- What about population a database with this generated data?

Comment 5 by Raymond Camden posted on 6/28/2010 at 10:44 PM

So who is going to play the more sexier/actor version of me? ;)

Comment 6 by Raymond Camden posted on 6/28/2010 at 10:46 PM

Wow, darn good ideas there. Like phone number. Wow. Thanks Guust!

As to your second idea - I want to stay vague, but someone else is making inroads into that right now. :)

Comment 7 by Raymond Camden posted on 6/28/2010 at 11:19 PM


You can get 1.1 from RIAForge. It includes:

*Thanks to Ryan V for pointing out I forgot the darn code to turn off cfdebugging.

*Support for random emails

*Support for random us phone #s

*Support for auto-incrementing numbers (acts like a primary key)

Comment 8 by Raymond Camden posted on 6/28/2010 at 11:20 PM

And I should say - thank you Guust for the pointer to

Comment 9 by David Buhler posted on 6/29/2010 at 7:20 AM

Hi Ray,

I have a Random Data Generator for CF that is also available on RiaForge. The RiaForge page lists data that the generator can create, and some of the data is slightly accurate (like the zip-code generation per state).

Note: because the street-addresses are 'made-up' on the fly, the address generator isn't useful for testing lat/lng geoencoders.

However, the test-data generated is highly-readable.


Please feel free to use any of my older project in your CFBuilder Extension.

Comment 10 by Raymond Camden posted on 6/29/2010 at 3:13 PM

Thanks David - I had no idea about your project before I worked on mine. The zip code part by itself sounds perfect. I'll take a look this week.

Comment 11 by David Buhler posted on 6/29/2010 at 7:38 PM

Hi Ray,

I'm afraid mine never got much traction. I'm also an amateur when it comes to CF, so I'm not going to promise that it's going to provide any moments of awe if you crack it open.

I built the project when I needed to test a system repeatedly and needed highly readable data.

I really like random data generators because they give a talking point in-house between developers and designers (the last name field should be on the same line as the first name), they give an idea as to the worst-case scenarios (what happens when a title is too long in the layout?), they allow you to test illegal characters (is this SQL Injection going to happen?) and they also give you a way to create various test-cases using a mix of data that may cause a system to crash if there's combination of required logic that hasn't been taken into consideration (if the user asked to be subscribed to the mailing list but never provided an email address, does the system fail), WITHOUT having to write test cases for every possible condition.

Mine included a content generator, too, similar to in intent.

Anyhow, the data inside of "Gazoo" may save you time if you continue to evolve your project.