Chapter 5. Test scenarios

Test scenarios in Red Hat Decision Manager enable you to validate the functionality of rules, models, and events before deploying them into production. A test scenario uses data for conditions that resemble an instance of your fact or project model. This data is matched against a given set of rules and if the expected results match the actual results, the test is successful. If the expected results do not match the actual results, then the test fails.

After you run all test scenarios, the status of the scenarios is reported in a Reporting panel.

Test scenarios can be executed one at a time or as a group. The group execution contains all the scenarios from one package. Test scenarios are independent, so that one scenario cannot affect or modify the other.

5.1. Testing the Pricing low end scenario

Test the Pricing low end scenario using the data that is specified in the Pricing loans decision table as shown in Section 4.1, “Viewing the Pricing loans decision table”. For information about testing decision services, see Testing a decision service using test scenarios.

Procedure

  1. Log in to Decision Central. Click MenuDesignProjects, then Mortgages.
  2. Scroll down and click the Pricing low end test scenario asset.
  3. Review the Pricing low end test scenario’s GIVEN and EXPECT conditions and values.
  4. Click Run scenario.

The Reporting section at the bottom of the window should show a Success message. This is the expected result as the values and conditions set in the test scenario meet the requirements as specified in the Pricing loans decision table.

5.2. Testing the Are they old enough scenario

Test the Are they old enough scenario using the data that you specified when you created the Underage guided rule. For information about testing decision services, see Testing a decision service using test scenarios.

Procedure

  1. Log in to Decision Central. Click MenuDesignProjects, then Mortgages.
  2. Scroll down and click the Are they old enough test scenario asset.
  3. Review the Are they old enough test scenario’s GIVEN and EXPECT conditions and values. Leave the preset age value of 17 as is.
  4. Click Run scenario.

The Reporting section at the bottom of the window should show a Success message. This is the expected result as an applicant below the age of 21 is not eligible for a mortgage loan as defined in the Underage guided rule.

age test