skip to main content
Corticon Studio: Rule Modeling Guide : Logical analysis and optimization : Testing rule scenarios in the Ruletest Expected panel : Techniques that refine rule testing : Using key attributes to improve difference detection in Ruletests
 

Try Corticon Now
Using key attributes to improve difference detection in Ruletests
The execution of Ruletests can, in some cases, erroneously detect differences between the Output and Expected results. This typically occurs in Rulesheets that add new entities to collections. The unsorted nature of collections makes it impossible to match the collections in the Output and Expected results with complete accuracy. An optional feature is available when you encounter problems with test failures due to the randomness of entity ordering. To avoid this problem, you can specify certain attributes as key attributes that will assist the comparison algorithm, that the validation linking entities in both panels are chosen based on the key values.
To set a key attribute, right click on it in the Expected panel, and then choose Key Attribute, as shown:
Key attributes are shown in italics in the current entity as well as all other corresponding entities in the Expected panel, as shown:
To remove a key attribute, right click on it again in the Expected panel, and then choose Key Attribute to clear the setting.
Setting multiple key attributes will attempt to match the full set.