Generating Test Data

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

You can generate data for either an empty database or for an existing database.

Note:

Do not implement triggers if you generate a new database. It is also recommended that you remove triggers from an existing test database. Triggers can considerably increase the time required to generate the database and can block insertions. In addition, they are not needed for the type of test we are performing.

  1. Assign data profiles to the columns in each table for which you want to generate test data (see Assigning a data profile).
    Note:

    Test data generation is typically based on user-defined data profiles. If you have no data profile definitions, you are automatically provided with default values. The default number of rows is set to 20 and the value <default> is displayed in each of the following three default profile boxes.

  2. Select Database > Generate Test Data to open the Test Data Generation dialog box.
  3. Specify a directory and filename for your test data file, and then choose between Script and Direct generation. For more information, see Test Data Generation General tab.
  4. [optional] To change the number of rows to be generated for specific tables, click the Number of Rows tab. For more information, see Test Data Generation Number of Rows tab.
  5. [optional] To modify script formatting options, click the Format tab. For more information, see Test Data Generation Format tab.
  6. [optional] To control which tables will have test data generated, click the Selection tab. For more information, see Test Data Generation Selection tab.
  7. 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 a 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.


Created October 7, 2009. Send feedback on this help topic to Sybase Technical Publications: pubs@sybase.com