第4章 Test scenario template
Before specifying test scenario definitions, you need to create a test scenario template. The header of the test scenario table defines the template for each scenario. You need to set the types of the instance and property headers for both the GIVEN and EXPECT sections. Instance headers map to a particular data object (a fact), whereas the property headers map to a particular field of the corresponding data object.
Using the test scenarios designer, you can create test scenario templates for both rule-based and DMN-based test scenarios.
4.1. Creating a test scenario template for rule-based test scenarios リンクのコピーリンクがクリップボードにコピーされました!
Create a test scenario template for rule-based test scenarios by following the procedure below to validate your rules and data.
Procedure
-
In Business Central, go to Menu
Design Projects and click the project for which you want to create the test scenario. -
Click Add Asset
Test Scenario. - Enter a Test Scenario name and select the appropriate Package. The package you select must contain all the required data objects and rule assets have been assigned or will be assigned.
- Select RULE as the Source type.
- Click Ok to create and open the test scenario in the test scenarios designer.
To map the GIVEN column header to a data object,
- Click an instance header in the GIVEN section.
- Select the data object from the Test Tools tab.
- Click Add.
- To insert more properties of the data object, right-click the property header and select Insert column right or Insert column left as required.
To map a data object field to a property cell,
- Click a property cell.
- Select the data object field from the Test Tools tab.
- Click Add.
To map the EXPECT column header to a data object,
- Click an instance header in the EXPECT section.
- Select the data object from the Test Tools tab.
- Click Add.
- To insert more properties of the data object, right-click the property header and select Insert column right or Insert column left as required.
To map a data object field to a property cell,
- Click a property cell.
- Select the data object field from the Test Tools tab.
Click Add.
Use the contextual menu to add or remove columns as needed.