Show TOC

Procedure documentationCreating and Running a Test Scenario Locate this document in the navigation structure

 

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 (Where is my ruleset?) and double-click the ruleset.

    or

    Locate the flow ruleset (Where is my flow ruleset?) and double-click the flow ruleset.

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

  3. In the test scenario editor, choose Create XML (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:

    This graphic is explained in the accompanying text.

    Note Note

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

    • Integers need not be in the specified format.

    End of the note.
  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 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.

End of the note.
Running the Test Case
  1. In the test scenario editor, choose Run Test Case (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 Note

  • If you do not see the Rule Testing Console window, choose   Window   Show View   Other  

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

End of the note.