This tool allows the creation of test data files based on a template structure (XML or JSON) and configurable generation rules.
This interactive tree displays the structure of the selected template file and allows configuration of data generation for each field.
Expand/Collapse:
Expand All
/ Collapse All
buttons control the entire tree's expansion state.Field Configuration: For each field (leaf node) in the tree:
Auto Increment (Enumerate): Generates sequential numeric values. Can often detect numbers within strings (e.g., ID-001
-> ID-002
).
Generate UUID: Creates unique identifiers.
From List: Selects values sequentially or randomly from a predefined list (managed via the MANAGE LISTS dialog).
Generate Date: Creates date/datetime values.
Generate Number: Generates random numbers.
Reference Value: Copies the generated value from another field within the same generated file.
Custom Script (Advanced): Uses custom code to generate a value.
Custom scripts are JavaScript expressions that generate dynamic values. They have access to:
// Generate IDs like "TD0000001", "TD0000002", etc.
// In this example, we don't use the "value" parameter
const prefix = "TD";
const baseNumber = 2; // Starting number
const digits = 7; // Number of digits in the numeric part
// Calculate the current number based on file index
const currentNumber = baseNumber + index;
// Format with correct number of leading zeros
const formattedNumber = currentNumber.toString().padStart(digits, "0");
// Combine prefix and formatted number
return `${prefix}${formattedNumber}`;
// For index = 0 → Returns: "TD0000002"
// Format a phone number (ignoring the original "value")
const num = Math.floor(1000000000 + Math.random() * 9000000000);
return `(${num.toString().substring(0,3)}) ${num.toString().substring(3,6)}-${num.toString().substring(6)}`;
// Returns: "(123) 456-7890" (with random numbers)
// Generate a date N days from today (YYYY-MM-DD)
const date = new Date();
date.setDate(date.getDate() + index * 7); // Weekly dates
return date.toISOString().split("T")[0];
// For index = 0 → Returns: "2023-07-14" (today's date)
// Generate GUIDs with a consistent pattern
return `${index}-${Math.random().toString(36).substring(2, 10)}-${Math.random().toString(36).substring(2, 6)}`;
// For index = 0 → Returns: "0-a1b2c3d4-e5f6"
// This example USES the "value" parameter
// Assuming "value" contains an age string like "25"
const age = parseInt(value || "0");
if (age >= 65) return "Senior";
if (age >= 18) return "Adult";
return "Minor";
// For value = "15" → Returns: "Minor"
// Combine title and author from row data
if (row.title && row.author) {
return `${row.title} by ${row.author}`;
}
// If row.title = "The Great Gatsby" and row.author = "F. Scott Fitzgerald"
// Returns: "The Great Gatsby by F. Scott Fitzgerald"
Saved Configurations Dropdown: Lists previously saved configuration sets for the currently selected template file type.
SAVE Button: Opens a dialog to name and save the current set of field configurations associated with the template.
Template Source (Optional ZIP): A dropdown to select a loaded ZIP file.
Generate Test Files Button: Starts the file generation process.