Chapter 68. Background instance in test scenarios In test scenario designer, you can use the Background tab to add and set background data for rules-based and DMN-based test scenarios. You can add and define the GIVEN data which is common for the entire test scenario simulation, based on the available data objects. Background tab has the ability to add and share the data among every test scenario. Data added using the Background tab can not be overridden by Model tab data. For example, if the test scenario example requires the same value for the person Age in all test scenarios, you can define the Age value in the Background page and exclude that column from the test scenario table template. In this case, the Age is set to 25 for all test scenarios. Figure 68.1. Example test scenarios with repeated value for Age Figure 68.2. Example background definition of repeated value for Age Figure 68.3. Modified test scenario template with excluded Age column Note The GIVEN data which is defined in the Background tab can only be shared between the test scenarios of the same *.scesim file and will not be shared among different test scenarios. 68.1. Adding a background data in rule-based test scenarios Follow the procedure below to add and set a background data in rule-based test scenarios. Prerequisites The rule-based test scenario template are created for the selected test scenario. For more information about creating rule-based test scenarios, see Section 65.1, "Creating a test scenario template for rule-based test scenarios" . The individual test scenarios are defined. For more information about defining a test scenario, see Chapter 67, Defining a test scenario . Procedure Open the rule-based test scenarios in the test scenario designer. Click the Background tab of the test scenarios designer. Select an instance header cell in the GIVEN section to add a background data object field. From the Test Tools panel, select the data object. Click Insert Data Object . Select a property header cell to add a background data object field. From the Test Tools panel, select the data object. Click Insert Data Object . To add more properties to the data object, right-click the property header cell and select Insert column right or Insert column left as required. Use the contextual menu to add or remove columns and rows as needed. Run the defined test scenarios. 68.2. Adding a background data in DMN-based test scenarios Follow the procedure below to add and set a background data in DMN-based test scenarios. Prerequisites The DMN-based test scenario template is created for the selected test scenario. For more information about creating DMN-based test scenarios, see Section 66.1, "Creating a test scenario template for DMN-based test scenarios" . The individual test scenarios are defined. For more information about defining a test scenario, see Chapter 67, Defining a test scenario . Procedure Open the DMN-based test scenarios in the test scenario designer. Click the Background tab of the test scenarios designer. Select an instance header cell in the GIVEN section to add a background data object field. From the Test Tools panel, select the data object. Click Insert Data Object . Select a property header cell to add a background data object field. From the Test Tools panel, select the data object. Click Insert Data Object . To add more properties to the data object, right-click the property header cell and select Insert column right or Insert column left as required. Use the contextual menu to add or remove columns and rows as needed. Run the defined test scenarios.

Commands: