Show TOC

Creating and Running a Test ScenarioLocate this document in the navigation structure

Use

You can write your rules on XML schema and instantly check if your rules are working fine by creating a test scenario. You can use only one set of simulated data in a test scenario.

Procedure
Creating the XML Document
  1. Locate the ruleset and double-click the ruleset.

    For more information, see Locating the Ruleset

    or

    Locate the flow ruleset and double-click the flow ruleset.

    For more information, see Locating the Flow Ruleset

  2. In the ruleset editor that appears, choose the Test Scenario tab.

  3. In the test scenario editor, choose Create XML in the top right corner.

  4. In the dialog box that appears, the Choose XSD option is selected by default.

    All the XML Schemas available in the DC gets displayed.

  5. Select the XSD based on which you want the XML document to be created.

  6. Choose OK .

  7. In the screen that appears enter the name of the XML in the File name: field and choose Next .

  8. Choose Finish .

    The XML document opens in the editor in the Design view.

  9. Expand the root element node and you should see all the elements on the left hand side.

  10. Enter values corresponding to each element in the cells on the right hand side as shown below:

    Note
    • Always enter double and float type values in the format: 0.0 .

    • Integers need not be in the specified format.

  11. Save the changes.

Adding the XML Document to the Test Scenario
  1. In the test scenario editor, locate the XML Documents for Test Input section and choose the Add XML button.

  2. In the dialog box that appears, select the checkbox referring to the XML document you created and choose OK .

    The XML document gets listed in the XML Documents for Test Input table.

  3. Save the changes.

Note

You can optionally add a definition as input and output data.

Adding a Definition as Input Data
  1. In the Input Definitions section, choose the Add button.

  2. In the dialog box that appears select the checkbox referring to a Definition and choose OK .

    The definition appears in the Input Definitions table.

  3. Enter the value in the relevant cell in the Input Value column.

Adding a Definition as Output Data
  1. In the Output Definitions section, choose the Add button.

  2. In the dialog box that appears select the checkbox referring to a definition and choose OK .The definition appears in the Output Definitions table.

Running the Test Case
  1. In the test scenario editor, choose Run Test Case .

  2. In the Rule Testing Console you should see the output of rule execution. You should also see the list of conditions that got satisfied and conditions that failed.

Note
  • If you do not see the Rule Testing Console window, choose Start of the navigation path Window Next navigation step Show View Next navigation step Other End of the navigation path

  • In the dialog box that appears, expand the Rules node and choose Rule Testing Console and choose OK