Creating and Running a Test Scenario

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:

  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.

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.