GenRocket allows you to quickly define and generate test data for complex nested Extensible Markup Language (XML) documents by importing an XML Schema Definition (XSD) that formally describes the elements and nesting in an XML Document. An XSD enables GenRocket to automatically create Domains, Attributes and other necessary components that represent the XML document. By importing an XSD into the GenRocket web platform, you're just a few steps away from Generating any of the XML test data necessary for your test cases.

Special Note: A fictional Organization XSD, containing nested elements of organization, departments, users and addresses will be used in some example images below. 

Step 1 - Log into GenRocket Web

Log into the GenRocket Web platform with your username and password.

Step 2 - Create a Project

From the Project Dashboard, within the Projects window, click the New Project button.

Step 3 - Enter Project Information

Within the New Project dialog, enter a project name, description (optional), select and Industry Type (optional), and click the Save button. 

Step 4 - Select Import from XSD

Within the Domains window, click the New Domain button, then select and click the Import from XSD option. 

Step 5 - Choose an XSD to Import

Click the Choose File button, to bring a dialog to select a file from your computer.  Select the XSD file you want to import. 

Note: The dialog will filter only the files with the .xsd extension.

Step 6 - Wait for Confirmation

After select your XSD to download, you will see the following message. Click the OK button and wait for an email notifying you when the import is completed; it should only take a few minutes.

Step 7 - Modify Generators

GenRocket will utilize its data warehouse and do its best to assign an appropriate Generator to each Domain Attribute; however, you may need to modify a few the Attribute Generators to generate the exact type of data you need for your test cases.

Step 8 - Set loopCounts

By default, GenRocket will set the loopCount on each Domain to 1.  You will need to modify the loopCounts on the Domains where you want more than one element of data to be generated.

Step 9 - Download Configuration

From within the Management window, click Configuration Management tab, select the Configurator you want to download, and click the Download icon.

Note: You can also click on the Edit icon (looks like a pencil) to modify how the filename will be generated for the generated XML file(s). 

Step 10 - Download the Config.xml file.

By default, the Configurator will create an XML file for download named, Config.xml.  It is expected that the file will be downloaded into a subdirectory of the base download directory called, config.  The XSD file should also be placed in the config subdirectory.  

For example: If downloading to your local computer's Download subdirectory, create or already have a config sub directory within the Download directory. Make sure to place both the XSD file and Config.xml in the config subdirectory.  

Step 11 - Download the ScenarioChainSet

With the Scenario Chain Sets window, click the Download icon to download the XSDScenarioChainSet1.  As each Scenario Chain Set may contain up to 25 Scenario Chains and each Scenario Chain may contain up to 25 Scenarios, you will must likely only have the one Scenario Chain Set to download, and its name by default will be, XSDScenarioChainSet1

The Scenario Chain Set does not have to be downloaded into the config subdirectory;  it is normally downloaded to the base directory the contains the config directory.

Step 12 - Start Generating XML Documents

Open up a command line terminal, goto the directory where you downloaded the Scenario Chain Set. From the command line, type the  command, genrocket -r ScenarioChainSet1.grs, and press the Enter/Return key.  

If all things have been setup correctly, you should see two subdirectories appear within the base directory.

  • segments - the directory where GenRocket will generate XML segmented test data files that will be eventually merge into one or more XML documents
  • output - the directory where one or more XML documents will be created and saved after the segment data has completed generating