User Guide > Data Generation > Data Generation for XSD Sources
  

Data Generation for XSD Sources

You can apply data generation rules to XML elements and attributes to generate test data.
View and open the XSD file from the Discover | Files view of the project. You can view the details of the XML elements and attributes in the XSD map view or the grid view.
Select an element, and apply a data generation rule to the element. You can select multiple elements and assign a default generation rule to the selected elements. You can remove all the default generation rule assignments, and assign another generation rule.
You can assign standard and custom generation rules to generate test data in XSD sources. You cannot use reference lookup and effective dates generation rules for an XSD source.

Data Generation Task Flow for XSD Sources

To generate data from XSD sources, you can assign the generation rules to the XML elements and attributes.
Perform the following high-level tasks to generate test data:
    1. Create a project.
    2. Import the XML source definition from the PowerCenter repository.
    3. Add data generation rules to the project.
    4. Open the XSD file from the project.
    5. Select an element or an attribute. Specify a generation rule for a data domain or apply generation rules individually.
    6. Create a data generation plan and add the XSD file. You can add multiple XSD files to a plan. Define the data generation parameters, and specify the target directory.
    7. Generate a workflow from the plan.
    8. Run the workflow, and monitor the progress of the workflow.
    9. Verify that the data is generated in the target.

Applying Data Generation Rules to XML Elements and Attributes

Apply data generation rules to XML elements and attributes to generate test data in an XML file.
    1. In a project, click Discover > Files.
    A list of XSD files in the project appears.
    2. Click the XSD file.
    The XSD file opens in a separate tab.
    3. Select the elements and attributes on which you want to apply the generation rule.
    4. In the Details pane, click Edit in the Data Generation section.
    5. Assign a data generation rule to the selected element or attribute. You can also create and assign an ad hoc generation rule.
    The following image shows a sample data generation rule assignment to an XML element:
    The Edit dialog box shows the Data Generation tab. A list of applicable data generation rules are displayed.
    6. To save the assignment, click OK.
    7. To assign default rules to multiple objects, click Default Assignment.
    8. To clear rule assignments, click Clear Assignment.