Before you start
Prepare for the tutorial by reading its description, and checking the audience and prerequisites.
You use scenario files to store scenarios and expected results for tests and simulations.
This tutorial introduces you to the configuration of the business object model (BOM) to enable the
generation of an Excel scenario file template.
To generate a template for an Excel scenario file to test your rules in Rule Designer or Decision Center, you must first configure the BOM of the rule project:
- The
Borrowerclass in the BOM has several constructors. You must select the constructor to use for creating test data. - The arguments of the constructor have generic names. You must rename them to obtain meaningful column headings in the Scenarios sheet of the Excel scenario file.
- To handle a collection of messages, you must define a new column in the Expected Results sheet. You must create a virtual attribute in the BOM.
- You use a domain in the BOM to see how to maintain it in the Excel-generated template.
Learning objectives
You do the following tasks:- Check a rule project to enable the generation of an Excel scenario file template.
- Select the constructor that defines the column headings in the Excel scenario file.
- Give meaningful names to the column headings.
- Create a virtual attribute on the BOM to test one element of a collection, and add a new test in the Expected Results sheet.
Time required
This tutorial should take approximately 20 minutes to finish. If you explore other concepts related to this tutorial, it could take longer to complete.Audience
This tutorial assumes that you are familiar with business rule programming principles, Java™ code, and the Eclipse environment.Prerequisites
All the files for this tutorial are contained in the following directory: <InstallDir>/studio/tutorials/dvsconfigureexcelfile.The tutorial directory has the following structure:
- answer: Answer directory for the tutorial, which contains an executable example.
- start: Start directory for the tutorial, which contains a rule project with a BOM to customize.
Best practices
This tutorial includes the following best practices for configuring the BOM for Excel testing:- Check that you used the correct constructor by generating an Excel scenario file. Example...
- Use argument names that correspond to the attributes that they reference. Example...