Overview of testing in Rule Designer

You can test rules in Rule Designer using a launch configuration.

Rule Designer provides launch configurations to run usage scenarios to test and debug the correctness of a ruleset. The launch configurations submit your scenarios to a Scenario Service Provider (SSP), which returns a report of the results of rule execution on the scenarios.

You can run tests or debug using the local SSP, or run tests remotely to check that the connection to Rule Execution Server is working and that the XOMs are accessible to the remote SSP.

If the tests show errors or do not match the expected results, you can debug in Rule Designer using a local SSP by stepping into the rules, adding breakpoints, and inspecting the variables to identify the problem.

Note: To use the DVS Archive and DVS Excel File launch configurations, make sure that you have installed the Rule Execution Server component.

The steps required to create and run the launch configurations for testing are described in Testing rules with a local or remote SSP. Launch configurations are built on the regular Eclipse Run > Run Configurations and Run > Debug Configurations features. The following figure shows a Launch Configuration to test a rule project against a scenario file in Excel:

Launch configurations

Rule Designer provides two types of launch configurations by default:

DVS Archive

DVS archives are generated in the Decision Center Enterprise console by business users when the results of their testing is not what they expected and they cannot identify or solve the problem themselves. A DVS archive contains the ruleset, the format, and the Excel scenario file or the custom scenario provider.

Business users can download the DVS archive from the Enterprise console and send it to the developers for debugging in Rule Designer.

DVS Excel File

DVS Excel files contain your scenarios in one of the default Excel formats. You must first obtain this file from the business user, or generate it (see Generating an Excel scenario file template) and enter the data for your scenarios (see Excel scenario files).

Note: When you create a custom format for your scenarios, you can also create a customized plug-in project for your launch configuration.

You indicate the location of your scenarios (DVS archive or Excel file in your workspace) in the first tab of the launch configuration, as well as the rule project to test and the location where the generated report is saved.

The launch configuration has two other tabs worth mentioning:

The following figure shows the workflow to test a rule project in Rule Designer:

Testing remotely in Rule Studio

When troubleshooting testing problems reported in Decision Center, make sure you synchronize the rule projects first.

After you have identified the problem: