Generate test data

This topic describes how use SB Data Generator to populate a database with realistic test data. It is recommended to save a copy of the database that you are going to fill with data before generating data, so you can go back if you are not satisfied with the results.

  1. First, navigate to “Tools | Generate test data”.
  2. In the data generation window, you have the choice to generate data from:

      Database sandbox: The test data on the database sandbox will be inserted into the connected database. To use this option, you must already have test data filled in the database sandbox. (See the section “Working with database sandbox”.)

      Generators: SB Data Generator will generate data using the generators specified previously (see the section “Assign Data Generators”). In this case, you need to set the number of rows to generate.

  1. Specify a connection to the database, and click “Connect” to test it. If the connection is successful, you can click the “Next” button; otherwise, review your connection configuration by going to “File | Manage Connections” (or [Ctrl+Alt+c]). (See the section “Connections management”).
  2. Check “Disable triggers” if you want to disable the triggers while the data are inserted to the database

 

image

 

In the next window, select the tables that you want to populate with test data, and click the “Start” button. If you generate data from “Generators” you have the possibility to customize the number of rows generated for each table.

 

image

 

When the data generation is finished, you can check to see whether the data were successfully inserted into your database by going to the status bar under the diagram area.

 

image

Note:

      For some data types, the only generator possible is “Set null”, which means that the generation of these data types is not supported.

      For columns with an auto-increment or sequence data type (for example, SERIAL in PostgreSQL or auto-increment in MySQL), data generation will not be possible because of the nature of these data types. The DBMS will automatically generate these data.

      In the case of a reflexive relationship and a primary key with an auto-increment or sequence data type, the generated data for the foreign key will be set to null.

 

Available in: Standard and Professional Editions