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.
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 and features. The following figure shows a Launch Configuration to test a rule project against a scenario file in Excel:
Rule Designer provides two types of launch configurations by default:
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 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).
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 Extraction tab, to run your tests on a subset of the rules in the rule project based on ruleset extractors (see Selecting artifacts for extraction into a ruleset).
The DVS Configuration tab, to run your tests on a remote server to check that Rule Execution Server is responding and that the XOM is accessible to the SSP. If you select remote testing, you must specify a DVS Project and a Configuration in the DVS Project. The configuration contains the credentials and URL of the remote SSP. You can also select whether you want to use the XOM deployed to Rule Execution Server to run your tests.
The following figure shows the workflow to test a rule project in Rule Designer:
When troubleshooting testing problems reported in Decision Center, make sure you synchronize the rule projects first.
If the problems are related to the rules, synchronize any changes back to Decision Center.
If the problems are in the Excel scenario file, correct the data and send it back to the business user.