Chapter 10 Generating a Database from a PDM


Using Test Data

Test data is sample data that you can define and generate for one or more tables in a PDM. When you generate test data, PowerDesigner automatically generates rows of data in database tables.

You normally use test data to verify the performance of a database that is being developed. You can use test data to do the following:

You can generate test data for selected tables in a PDM, or for all the tables in a PDM.

You can add test data to an empty database or to a database that already contains data.

Test Data profile

You generate test data for a table based on test data profiles. A test data profile is a named class of data types that has a defined data generation source. A test data profile can be assigned to one or more columns.

When you assign a test data profile to a column, it acts as a representative for the data type of that column. Test data for the column is then generated using the data profile and its defined data source.

You can also select a test data profile to apply to a domain. You can then choose to have the profile automatically assigned to all columns that use that domain.

A test data profile can use one of the following:

Example

For a column named Employee Location, you create a test data profile named Address using the Character class. You then define a test data source for Address. You can also assign it to other columns, such as Store Location, and Client Address.

Default test data profiles

If you do not assign a test data profile for a column, a default test data profile is assigned to the column when you generate test data for the table. You define default test data profiles for each class used to generate test data.

Test data restrictions

The following objects are not taken into account when you generate test data:

Steps To set up a test data profile:

  1. Create a test data profile for one or more columns.
  2. Define a test data generation source for each data profile.
  3. Define column fill parameters for columns that need to be populated with data in a particular way.
  4. Assign test data profiles to all relevant columns.
  5. Use the test data profiles to generate test data.

 


Copyright (C) 2005. Sybase Inc. All rights reserved.