Description
The Import from CSV for Fixed File option allows you to import a CSV file of a defined format (e.g., Domain, Attributes, Data Type, Size, etc.) to generate a fixed file. During the import, GenRocket will automatically set up the Project to generate Fixed File output, including the following:
- Domain(s)
- Attributes
- Receivers
- Scenarios
- Scenario Chain (contains all Scenarios)
- Configuration File (config.xml)
What Information Should be in the CSV File?
The imported file must contain the following information:
- Domain Name
- Field Name
- Data Type and Size
- Start Position
- End Position
- Parent Domain (where applicable)
A Field represents a GenRocket Attribute and Column Headers in the file are Case Sensitive. The sample file below contains the standard four Domains:
- Organization
- Department
- User
- Address
How to Import CSV File for Fixed File Output
- Expand the New Domain menu and select Import from CSV for Fixed File.
- Click Choose to browse and select the CSV file.
- Select a Delimiter (e.g., Colon, Comma, Tab, Pipes).
- Click Save.
- Click OK.
Project Setup After Import
- Domains Created - Organization, Department, User, Address, and Merge.
- Parent/Child Relationships - The following relationships have been defined between the created Domains:
- Organization is the parent of Department
- Department is the parent of User
- User is the parent of Address
- Receiver Assigned - All Domains except the Merge Domain have been assigned the SegmentDataCreatorReceiver.
- Merge Domain - The Merge Domain merges the generated segments for the other four Domains. It has been assigned the FixedFileSegmentMergeReceiver.
- Scenario - Each Domain has a Scenario.
- Scenario Chain - Contains all Scenarios with the Merge Scenario in the last position.
- Config File - Specifies the configuration for the output file (file naming convention, segment positioning, etc.)
Recommended Project Setup Steps
The following actions are recommended after completing your import:
- Check each Domain's Attributes and their assigned Generators.
- Make parameter changes or assign a different Generator.
- Make parameter changes or assign a different Generator.
- Change loop counts to ensure the right amount of data will be generated.
- Each Domain's loopCount will be set to '1' by default.
- You can change the Domain loopCount or use Test Data Cases to generate different varieties and volumes of data (recommended).
Generating Your Fixed File
Download the following items before running the command to generate your fixed file:
- Scenario Chain
- It needs to be in the resource.home.directory
- Ensure that the command prompt or terminal window points to the path where it is located.
- Config.xml File
- Located in the Project Dashboard -> Configuration Management Tab
- Unzip and place contents in a Config folder within your resource.output.directory.
Sample Generated Data
Changes have been made in the Project to generate 1 Organization, 2 Departments, 5 Users per Department, and 1 Address per User.