Generating Test Data to a Database

Test data is sample data that PowerDesigner generates as rows in your database tables to verify database performance or to help in estimating the amount of memory that the database will require. You can generate test data for some or all of the tables in your PDM to an empty or existing database.

Note:

As triggers can considerably increase the time required to generate the database and can block insertions, and as they are not needed in this context, we recommend that your do not implement triggers or remove them if you are using an existing test database.

Test data generation uses test data profiles (see Test Data Profiles) to define the data to generate. We recommend that you create test data profiles to accurately model your data and associate them with the appropriate columns or domains, but if you have not done so, then default profiles are used.

Note:
The following objects are not taken into account when you generate test data:
  • Alternate keys

  • Foreign keys

  • Business and validation rules

  • Binary, sequential, OLE, text or image data types

  • Trigger contents

  1. Select Database > Generate Test Data to open the Test Data Generation dialog box.
  2. On the General tab (see Test Data Generation General tab), specify whether you want to perform a Script, Direct, or Data file generation and complete the appropriate parameters.
  3. [optional] Click the Number of Rows tab (see Test Data Generation Number of Rows tab) to change the number of rows to be generated for each table.
  4. [optional] Click the Format tab (see Test Data Generation Format tab) and modify the script formatting options.
  5. [optional] Click the Selection tab and select which tables you want to generate test data for. By default all tables are selected.
  6. Click OK to start the generation.

    If you are generating a test data script, then a Result dialog box asks you if you want to Edit or Close the newly generated file.

    If you are generating test data to a live database connection, then the Connect to a Data Source dialog box opens. Select a data source, and then click Connect.

    A message in the Output window indicates that the test data generation is completed.