< Previous | Next >

Task 2: Customizing column headings

You give meaningful names to column headings.

About this task

In the BOM, the names of the constructor arguments are set by default to arg1, arg2, arg3, arg4, and arg5. The column headings in the Excel scenario file template correspond to the BOM object that you want to test. The required column headings are defined by the constructor arguments.

In this task, you give meaningful names to the constructor arguments so that they reflect the BOM object being tested. Then, you generate the Excel scenario file template to see the results.

Procedure

  1. Modify the names of the constructor parameters:

    To check that you have successfully renamed the column headings, generate the Excel scenario file template.

    1. In the Rule Explorer, double-click the Borrower class (loanvalidation-rules > bom > model > loan > Borrower).
    2. In the Members area, double-click the Borrower (String, String, Date, String, int) constructor.
    3. In the Arguments area, double-click the arguments to edit them, and change them as follows:
      • arg1 to firstName
      • arg2 to lastName
      • arg3 to birthDate
      • arg4 to SSN
      • arg5 to creditScore

      The new name given to an argument corresponds to the attribute that it references. If the attributes are verbalized, the column headings are verbalized accordingly. For example, the attribute firstName is verbalized as first name and appears as such in the Excel scenario file template.

    4. Save the changes.
  2. Generate the Excel scenario file template:
    1. In the Rule Explorer, right-click the loanvalidation-rules project, and then click Decision Validation Services > Generate Excel Scenario File Template.
    2. Keep the default options as you did in the previous task.
    3. On the Expected Results page, click Next because you do not need to include any tests for now.
    4. Click Finish.
    5. In the Rule Explorer, double-click testsuite.xls to open it.

      The column headings displayed in bold are now first name, last name, birth date, SSN, and credit score.

      Scenarios sheet
    6. Close testsuite.xls.
  3. Ignore one column:

    All attributes that have a setter in the BOM appear as optional in the generated Excel file.

    To remove the zip code column:
    1. In the BOM editor, click the Class tab to open the Borrower class.
    2. In the Members area, double-click zipCode.
    3. In the General Information part of the editor, select Ignore for DVS.
    4. Save the changes by using the save button in the Eclipse toolbar.
    The zip code column no longer shows in the generated Excel file.

What to do next

In the next task, you add tests that are displayed in the Expected Results sheet.

< Previous | Next >