Setting a range

After you define the structure of a schema, you can set a number range to specify the number of occurrences to generate an item type in the test data.

Before you begin

  • You must have a group type in your schema.
  • You must have a structural view of your schema.

About this task

You can set the number range only for item types and group types of your schema.

Procedure

  1. Log in to HCL OneTest Server and open the team space that contains your project.
  2. Open your project.
    The Overview page is displayed.
  3. Click Author > Data Fabrication.
    The Data Fabrication page is displayed.
  4. Select the generated schema from the Schemas tab.

    For example, schema_<number>

  5. Click the Menu icon of the group type of the schema and select Structure.

    The structural view of the schema is displayed.

  6. Click the Menu icon of all item types in the Structure dialog to set the restriction for several occurrences of the item types in the generated test data.
    You can set the following restriction rules:
    • Set Optional
    • Set Required
    • Set Range
    • Set Unlimited
    In the following table, you can find the value of the minimum and maximum occurrences that you can set as restrictions for the item types:
    Item properties Minimum occurrences Maximum occurrences
    Optional 0 1 or more
    Required 1 1
    Unlimited 1 1 or more
    Set Range Any minimum value
    Note: Minimum value should be equal to or less than the maximum value
    Any maximum value
  7. Save the changes.

    You can modify the properties of the selected item type by using Properties in the context menu.

Results

You have set the number range for the selected item types.

What to do next

You can apply functions to define component rules to any item type. You can also generate test data without applying functions. See Generating test data.