< Previous | Next >

Task 5: Validating

In Decision Center, you can test a ruleset against typical execution scenarios to check that the rules operate as expected.

The scenarios are stored in an Excel file called “scenario file”. When you create a test suite, you must specify the set of rules to test and the file containing the scenarios. After running the test suite, a report compares the results that you expected to have with the actual results obtained when applying rules on your scenarios.

In this tutorial, you run test suites and simulations on a configured server called Sample. Rule Execution Server provides a runtime execution environment on which test suites and simulations are run.

Previously, you modified the debt-to-income ratio in the minimum income rule. In this task, create and run a test suite to check that the modified rule behaves as expected.

Time This task should take you about 15 to 20 minutes to complete.

Step 1: Create and run a test suite

To run a scenario in Decision Center, you must create a test suite. For the purpose of this tutorial, the scenario file for the test suite is already created for you. The miniloan-test.xls scenario file is located in <InstallDir>/gettingstarted/EnterpriseConsole/, where <InstallDir> refers to your installation directory. The scenario file is available in Excel 2003 format. You can open it and take a look at it to view the scenarios that you are about to execute.

The scenario file contains two scenarios with their corresponding expected results. The scenarios are listed in the Scenarios tab, and the anticipated results in the Expected Results tab.

To create and run a test suite:

  1. Make sure that you are still signed in to Decision Center as rtsUser1 and that the Project in use is set to miniloan-rules.
  2. Click the Compose tab.
  3. In the Compose tab, select Test Suite, and then click OK.
  4. In Step 1: Properties, enter Miniloan Test as name for the test suite, and click Next.
  5. In Step 2: Rules Tested, click Next to test all the rules in the project.
  6. In Step 3: Scenarios, select Excel 2003 as the format for the scenario file.
  7. Click Browse, and select <InstallDir>/gettingstarted/EnterpriseConsole/miniloan-test.xls to upload the scenario file.

    The miniloan-test.xls file is now shown as uploaded.

    File upload
  8. Click Finish and Run.
  9. On the Run page, make sure that the Sample server is selected, and click Run.

    Decision Center may take a few seconds to complete this action.

    The report opens and shows the results of the tests:

    Report

    Scenario 1 fails because it expects the loan to be rejected. However, the loan is now approved because you have increased the allowable debt-to-income ratio in the minimum income rule.

Step 2: Modify the Excel scenario file

To correct the problem in Scenario 1, you edit miniloan-test.xls and modify the expected results for Scenario 1. You also add a new scenario to verify that the loan is rejected if the debt-to-income ratio is too high.

To edit the scenario file:

  1. Open the miniloan-test.xls scenario file from <InstallDir>/gettingstarted/EnterpriseConsole/.
    Tip:

    Make a copy of this file to use as a back up.

  2. Click the Expected Results tab, and change the expected result for Scenario 1 to TRUE.
    Modify Expected Results
  3. Click the Scenarios tab, copy and paste the Scenario 1 row, to create a new line for Scenario 3.
  4. Change the name to Scenario 3, and change the yearly income value to 60000:
    Add a scenario
  5. Click the Expected Results tab, add a new row for Scenario 3, and enter FALSE as expected result.
  6. Save the changes and close the file.

Step 3: Edit and run the test suite

To test the scenarios that you modified, you edit the test suite in Decision Center and run it again.

To edit and run the test suite:

  1. In Decision Center, click the Explore tab, and click Test Suites.
  2. Select the check box next to the Miniloan Test test suite, and click Edit in the toolbar.
  3. Click Step 3: Scenarios, click Browse in the File section, and select <InstallDir>/gettingstarted/EnterpriseConsole/miniloan-test.xls to upload the scenario file that you modified.
  4. Click Finish and Run.
  5. On the Run page, make sure that the Sample server is selected, and click Run.

    The report opens and shows that the tests are successful: the expected results match the execution results.

    The minimum income rule is correct and behaves as expected.

You have tested your rules against possible scenarios, in the next task you create a simulation on a large set of scenarios to assess the performance of the rules.

< Previous | Next >