124 Flexible Decision Automation for Your zEnterprise with Business Rules and Events
The KPIs are defined at the scenario-suite format level and are not defined by the business
user.
In the simulation report, the values of all calculated KPIs are displayed. The same simulation
can be run against separate versions of the same ruleset. Separate reports can be compared
to check the differences between the KPI values. This capability allows the business user to
fine-tune the content of the business logic between various executions of the same simulation
until the desired KPI values are attained.
6.2 Testing and simulation architecture for z/OS decision
services
This section discusses the testing and simulation architecture for decision services on z/OS.
6.2.1 Test and simulation artifacts
This section lists the test and simulation artifacts.
Scenario suites
A scenario suite is an artifact that is created in Decision Center to define either a test suite or
a simulation (Figure 6-1).
A scenario suite is attached to a rule project (or a ruleset), for which it defines tests or
simulation cases. After its creation, you can run a scenario suite from within Decision Center
at any time. Each execution creates an execution report that is stored along with the scenario
suite in the Decision Center database.
Figure 6-1 Scenario suite artifacts in Decision Center: Simulations and test suites
Decision Validation Services archives
A Decision Validation Service (DVS) archive is an artifact that contains both a scenario suite
and its associated ruleset in a single file that is easy to share. Scenario suite archives can be
exported from Decision Center and imported into Rule Designer, for execution and debugging
Chapter 6. Decision testing and simulation 125
by a developer. This archive is used when errors occur in the ruleset during the execution of a
scenario suite, and the business user needs help from a support team to understand what
happened.
Scenario suite formats
When creating a test suite or a simulation in Decision Center, the business user is presented
with a list of supported formats by the scenario suite creation wizard (Figure 6-2). These
formats are the scenario suite formats. They encapsulate the information that is required by
the testing and simulation features to understand how a scenario suite is defined and needs
to run.
Figure 6-2 Selection of a scenario suite format when creating a scenario suite in Decision Center
The scenario suite format defines the following information:
򐂰 The scenario provider implementation to use at run time. The scenario provider is a Java
class that implements the ilog.rules.dvs.core.IlrScenarioProvider interface. The scenario
provider performs the following actions:
The scenario provider retrieves scenario data and returns a set of input parameter
values for each scenario case.
If the scenario is a test suite, the scenario provider provides the set of tests to be run
on each scenario case execution result.
The scenario provider typically retrieves the scenario data and the test specification
from a dedicated data store (a relational database or a file, for example) that is
provided at creation time by the user running a test suite or simulation. Testing and
simulation for decision services on z/OS come with a predefined scenario provider.
This scenario provider retrieves both the scenario data and test specifications from a
Microsoft Excel workbook that was previously generated for a ruleset in Decision
Center or in Rule Designer. This scenario provider is referred to as the
Excel scenario
provider
. Information about the data store to use for a scenario provider is retrieved
from a dedicated graphical user interface in Decision Center and Rule Designer. For
Decision Center, this user interface is defined by a scenario suite resource renderer
class. This scenario suite resource renderer class is a Java class that implements the
ilog.rules.teamserver.web.components.renderers.IlrScenarioSuiteResourcesRenderer
interface. For Rule Designer, this user interface is defined by an Eclipse launch
configuration plug-in.
򐂰 Both the rendered class and the launch configuration plug-in fully qualified names are
stored in the scenario suite format, along with the scenario provider implementation fully
qualified name.
򐂰 The precision (number of meaningful digits after decimal point) to use when testing
numbers. For example, you might want number comparison to be only meaningful up to
two digits after the decimal point; consider that an observed value of 2.55457 matches an
expected value of 2.55.
򐂰 The list of execution details that can be tested when using this format to create a test suite.

Get Flexible Decision Automation for Your zEnterprise with Business Rules and Events now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.