Skip to Main Content
Some approaches to Model-Based Testing focus on test case generation from assertions (operation pre- and post- conditions) and invariants, e.g., written in the Object Constraint Language. In such a setting, assertions must be validated. Validation is often carried out via executing scenarios wherein system operations are applied, to detect unsatisfied invariants or failed preconditions. This paper aims to improve the understanding of how to write useful validation scenarios for assertions in OCL. To do so, we report on our experiences during the creation and execution of 237 scenarios for validating assertions for the Mondex Smart Card application, and describe several observations that can help to improve the process of writing these scenarios. We also describe the important factors that must be considered in transforming these scenarios into abstract test cases.