Chapter 7. Background instance in test scenarios
In test scenario designer, you can use the Background tab to add and set the background data for rules-based as well as 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.
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.
7.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 4.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 6, 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.
7.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 5.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 6, 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.