Task 5: Testing and deploying

You prepare and run a test suite, and then deploy a RuleApp from your decision model service to the execution environment.

About this task

Now that your decision model service is complete, you create a test suite to do regression testing, and then deploy the service as a RuleApp to the execution environment.

Related conceptsValidating and testing decision model servicesDeploying a decision model service

Step 1: Generating the scenario file

The first step to creating a test suite is to generate an empty scenario file. Scenarios represent real or fictitious use cases that you use to validate the behavior of your rules. Each scenario contains all the information that is needed to run your rules properly.

About this task

A completed copy of the scenario file is available in <InstallDir>/teamserver/tutorials/decisionModel/salutation.xlsx. You can skip steps 1 and 2 if you are already familiar with scenario files.

Procedure

  1. Open the Tests tab.
  2. Click the Generate Scenario File button "".
  3. Name your scenario file salutation.
  4. In the tests to include, select Salutation.
  5. Click Download, and save the file to a location on your computer.

Step 2: Entering the scenarios and expected results

You create scenarios of representative cases for the client application. Each row in the first spreadsheet represents a scenario. Its columns indicate where to put the data for the scenarios. In the second spreadsheet, you enter the expected results of each scenario.

Procedure

  1. Open the scenario file on your computer.
  2. Enable editing if required, and enter the following data in the Scenarios tab:
    Image shows the scenario input data.
  3. At the bottom of the spreadsheet, click the Expected Results tab to open it.
  4. Enter the following expected results for the scenarios:
    Image shows the expected results.
  5. Save and close the file.

Step 3: Creating and running the test suite

You run the test suite to compare your expected results with the actual results.

Procedure

  1. In the Business console, click main in the breadcrumbs.
  2. On the Tests tab, click the Add button "" to create a new test suite.
  3. Name the test suite Salutation test suite.
  4. In the File to use section, click Choose and upload the scenario file. If you did not create a scenario file, you can upload <InstallDir>/teamserver/tutorials/decisionModel/salutation.xlsx instead.
  5. Click Save and Run > Create New Version, and then OK to the message on the progress report.
  6. When the status of the test is complete, click the report name.
    You see that the scenarios ran successfully. The expected results that you entered are the same as the returned results.

    Image shows the test report showing all successful.

  7. Close the report.

Step 4: Deploying the decision model service

The decision operation defines the rules to deploy, and the input and output parameters. Because a decision model service acts as one entity, there is only one decision operation available, which includes all the rules of the decision model. This decision operation is created automatically and updated every time you save.

About this task

A deployment configuration contains all the information required to deploy a RuleApp from your decision model service, including the target server and the decision operation. For convenience, a deployment configuration is created the first time you save your decision model service, and for security, only users with configuration manager rights can view it.

The RuleApp contains the ruleset developed in the decision model service. The execution environment runs the ruleset for the client application (see Deployment configurations).

Procedure

  1. Log out of the Business console, and then log back by using Paul as the user name and password.
    This user has configuration manager rights.
  2. On the Library tab, click the Salutation2 decision service, and then click main on the Branches tab.
  3. Click the Deployments tab.
  4. Click on Salutation2 Deployment.
    Look at the different subtabs to understand what is contained in the deployment configuration.
  5. On the Operations subtab, hover over Salutation2 Operation to see its contents.
  6. On the Groups subtab, you can grant rights to user groups so that they can deploy using this deployment configuration. For example, to give Bea the right to deploy, you edit the deployment configuration and add UserGroup.
  7. In the top banner, click Deploy.
  8. Select Decision Service Execution as the target server, and then click Deploy.
  9. Click OK to close the status report message.
  10. When the status is complete, click the report link to show the results of the deployment.
    The report shows that the deployment was successful.
  11. Click Close, and then log out.

Results

You have completed this tutorial, and learned how to create, test, and deploy a decision model service.

Operational Decision Manager provides the execution environment to which you deployed a RuleApp from your decision model service. To learn about this environment, see Tutorial: Managing RuleApps.