Decision Rule conflicts
Conflict tests
You can unit test decision tables and decision trees by using the same facility as other rule types. The decision table and decision tree rule forms include the ability to test for conflicts and completeness. The tests help to identify potential gaps in the decision rule execution by identifying either missing conditions or conditions that may not be tested during execution.
Checking for conflicts identifies if your decision rule prevents one or more of its rows or branches from ever being used. Show conflicts verifies incorrect conditions. A warning is displayed on the row, which causes the conflict to specify the condition that did not evaluate. For example, assume your decision table contains a row that tests for purchase requests that exceed USD300. The next row tests for purchase requests that exceed USD500. The second row may never be evaluated, because the upper row includes that condition. A decision rule without conflicts is said to be consistent.
The following image shows the test for conflicts for a decision table and a decision tree. The decision table shows that condition Credit Score >1000 cannot be evaluated because it is a larger value than the 900 condition that is evaluated first. The decision tree shows that UnitPrice < USD25 cannot be reached because the condition UnitPrice < USD50 is evaluated first and includes the previous condition.
In the center of the following image, slide the vertical line to view the decision table and decision tree test conflicts comparison.
Check your knowledge with the following interaction.
Completeness tests
identifies a decision table that has missing conditions or a decision tree that has missing branches. The system adds rows to indicate tests that are missing in the original decision rule. You can add returned results as additional rows if the decision rule needs a more detailed evaluation of the values.
The following image shows the test for completeness for a decision table and a decision tree testing two property values – customer level and customer revenue. The customer level property is configured as a local list with three possible values – bronze, silver or gold. Both the decision table and tree are configured to apply specific discount rates based on the bronze customer level with three different revenue threshold values. The show completeness feature adds rows to check for:
- A revenue threshold equal to or less than 10000
- The silver and gold customer levels.
The user determines if the suggested conditions are necessary. In center of the following image, slide the vertical line to view the decision table and decision tree test completeness comparison.
Check your knowledge with the following interaction.
Want to help us improve this content?