Vision

Generating Database Test Data

August 5, 2006

Ever had trouble generating database test data? The DTM Data Generator tool is a really cool tool that can help out. You can download a trial version at the following address: download DTM Data Generator. This trial version is already useful in itself, and definitely worth some of your time.

When you start the tool you get to choose if you already want to create a connection to a database. This is shown in Figure 1.

After creating a new database connection, you can choose for which of the tables located in the database you want to generate test data. We've created a test database that only contains one test table called 'Customers', so we'll choose that one, which is shown in Figure 2.

If you want you can add the test data directly to the database. Typically, we prefer to generate SQL insert statements which help to reproduce the same identical test data which is ideal for developers that are creating unit tests to safeguard their software. This is shown in Figure 3.

By default, the data generator generates gibberish, completely random data. You can adjust this and generate meaningful data by clicking the Edit Rule button that is shown in Figure 4.

This opens the Data Rule window that provides an overview of all table columns. You can specify rules for data generation for each specific columns. For example, you can choose to generate Names for the name column in our custom customers database table by specifying the following Fill method: From Values Library. Then expand the General folder and select Names. This is shown in Figure 5.

As another example, you can also specify your own list of custom values by choosing the following Fill method: From List of Values. This is shown in Figure 6.

We ourselves are very satisfied with this product, and we weren't even paid to say that :-). So if this post has wetted your appetite to try out the product... Happy generating!

« back to overview page