Relationship between the BOM and the Excel file

You use Excel to format scenarios. Some columns in the scenario file use the information contained in the BOM of the rule project.

When you use Excel as the format for your scenarios, columns in the Scenarios and Expected Results sheets of the Excel scenario file are generated using information contained in the BOM of the rule project.

Consequently, you must make sure that the project is valid (see Validating the project) so that the BOM creates the correct input columns when you generate the Excel scenario file template (see Generating an Excel scenario file template).

Also, you can add or remove the columns in the Excel scenario template file by configuring the BOM, as described in Adding columns to the Excel file.

This section explains how information retrieved from the BOM affects the sheets of the Excel scenarios file.

Scenarios sheet

The columns in the Scenarios sheet are defined by the BOM classes that define instances of input parameters required to execute the rulesets.

The Scenarios sheet is composed of:

Required columns

These provide the data that is required to execute your rulesets. The name of a required column displays in bold in the Excel sheet.

Optional columns

These provide additional information on the scenarios.

The attributes of the BOM class define the optional column headings. Each optional column corresponds to an attribute. If the attribute is verbalized, the name in the column heading is the verbalization of the attribute.

Note:

You can use only attributes that are non-static, and writable ("read/write" and "write only") to create optional columns.

A class or an interface in the BOM requires a constructor for it be useful in an Excel scenario file template. A constructor of the BOM class defines the required columns. Choose the constructor that you want to use for the Excel scenario file template.

A class sometimes has a default constructor that does not have any arguments. When there are several constructors in a class, the class uses the constructor with no arguments by default. If a class has several constructors, you must specify the one you want to use in your tests by selecting the DVS constructor option in the General Information section of the BOM editor.

Constructor selected for DVS
Note:

If the constructor has no arguments, a required column does not show in the Excel scenario file template.

The name of the arguments in the constructor define the required column headings.

By default, when you generate a BOM from a XOM, the constructor arguments have generic names such as arg1, arg2, and arg3, as shown in the following figure:

Constructor arguments with default name

To obtain meaningful column headings, you must rename these arguments. Make sure that the name of the constructor arguments are meaningful to a business user.

You must rename each argument that references an attribute with the name of the attribute. For example, if arg1 sets the value of the attribute firstName, you must rename arg1 to firstName. You must rename other arguments with a name that is meaningful to a business user. The following figure shows an example of arguments that have been renamed:

Constructor arguments with attribute name
Note:

You can also use annotations in your XOM to give a business name to the arguments, see @BusinessName.

The name displayed in the column heading is the verbalized name of the attribute or constructor argument:

Expected Results sheet

The ruleset output parameters and the BOM classes define the columns in the Expected Results sheet of the Excel scenario file template.

The attributes of the BOM class define the column headings. Each column corresponds to an attribute.

You must verbalize each attribute because the name in the column heading is the verbalization of the attribute. If the attribute is a collection, you must define the domain.

Note:

You can use only attributes that are non-static and readable ("read/write" and "read only") to create columns.