Chapter 10 Generating a Database from a PDM


Defining an automatic test data generation source for characters

You have the following options to define generation source parameters for the profile class Character:

Option Parameter Description
Verify Valid characters List of authorized characters
  All Accepts all characters
  Invalid characters List of unauthorized characters
  No accents Replaces accents with unaccented characters
  Mask String of mask characters.
Case Upper

First uppercase

Lower

Mixed
Indicates authorized letter cases
Length Exact You indicate exact character length
  From/To You indicate character length range

Character selection

You can specify valid characters to accept and invalid characters to refuse. You use a comma ( , ) to separate each single character, character interval, or string.

The following syntax applies to valid and invalid characters.

Character set Syntax Example
Interval of characters Characters in single quotation marks separated by a dash
'a'-'z'
Single character or Character string Characters in quotation marks
"a" | "xyz"

Mask characters

A mask character is a pre-defined character that indicates to users that they need to type a particular piece of information. The test data that is generated respects the following mask characters:

Mask character
Prompts to type
A Letter
9 Number
? Any character

Steps To define an automatic data generation source:

  1. Select Model→Test Data Profiles.

    The List of Test Data Profiles appears.
  2. Double-click a test data profile using characters.

    The Profile properties sheet opens to the General page.
  3. Select the Automatic radio button.
  4. Click the Detail tab.

    The Detail page appears.
  5. Specify test data generation parameters.
  6. Click OK in each of the dialog boxes.

 


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