Test Data Section Documentation
This section focuses on the Test Data Generator, a tool designed to create multiple test data files based on a template structure (XML or JSON) and configurable generation rules.
Core Workflow
- Select Template: Choose a loaded file (from the "Files" section) to use as the structural template for generation.
- Configure Fields: Define how data should be generated for each field within the template structure.
- (Optional) Save Configuration: Save the current field configurations for later reuse.
- Set Generation Options: Specify the number of files to generate and optionally choose a source ZIP template.
- Generate: Create the test files based on the template and configurations.
Features
1. Template Selection
- Select Template File: A dropdown list populated with the currently loaded files (XML/JSON). The selected file's structure is displayed in the "Template Configuration" area.
- Defaults to the first loaded file if available.
2. Template Configuration
This interactive tree displays the structure of the selected template file and allows configuration of data generation for each field.
Field Generation Behaviors
- Keep Original: (Default) Uses the exact value found in the template file.
-
Auto Increment (Enumerate): Generates sequential numeric values. Can often detect numbers within strings (e.g., ID-001
-> ID-002
).
- Options: Starting value (can use template value), increment amount.
-
Generate UUID: Creates unique identifiers.
- Options: Uppercase/lowercase, prefix, suffix.
-
From List: Selects values sequentially or randomly from a predefined list (managed via the "Manage Lists" dialog).
- Options: Select list, selection mode (sequential, random).
-
Generate Date: Creates date/datetime values.
- Options: Mode (Increment Day/Time, Today +/- Days, Fixed Date, Random Date), base date, date format, include time.
-
Generate Number: Generates random numbers.
- Options: Type (Integer, Decimal), min/max values, precision (for decimals).
-
Reference Value: Copies the generated value from another field within the same generated file.
- Options: Specify the source field, optional simple transformation.
-
Custom Script (Advanced): Uses custom code to generate a value.
- Options: Provide code snippet.
3. Configuration Management
-
Saved Configurations Dropdown: Lists previously saved configuration sets for the currently selected template file type.
- Selecting a saved configuration applies its rules to the "Template Configuration" tree.
-
Save Button (Save icon): Opens a dialog to name and save the current set of field configurations associated with the template.
- Saved configurations are stored locally in your browser.
4. List Management
- Manage Lists Button (List icon): Opens the List Manager dialog.
- Allows users to create, view, edit, and delete reusable lists of text values.
- Lists can be imported/exported.
- These lists are used by the "From List" field behavior.
5. File Generation Options