A Fuzzy Logic Based Approach for Model-based Regression Test Selection Mohammed Al-Refai Computer Science Department Colorado State University Fort Collins, CO, USA Email: al-refai@cs.colostate.edu Walter Cazzola Department of Computer Science Università degli Studi di Milano Milan, Italy Email: cazzola@di.unimi.it Sudipto Ghosh Computer Science Department Colorado State University Fort Collins, CO, USA Email: ghosh@cs.colostate.edu Abstract—Regression testing is performed to verify that previ- ously developed functionality of a software system is not broken when changes are made to the system. Since executing all the existing test cases can be expensive, regression test selection (RTS) approaches are used to select a subset of them, thereby improving the efficiency of regression testing. Model-based RTS approaches select test cases on the basis of changes made to the models of a software system. While these approaches are useful in projects that already use model-driven development methodologies, a key obstacle is that the models are generally created at a high level of abstraction. They lack the information needed to build traceability links between the models and the coverage-related execution traces from the code-level test cases. In this paper, we propose a fuzzy logic based approach named FLiRTS, for UML model-based RTS. FLiRTS automatically refines abstract UML models to generate multiple detailed UML models that permit the identification of the traceability links. The process introduces a degree of uncertainty, which is addressed by applying fuzzy logic based on the refinements to allow the classification of the test cases as retestable according to the probabilistic correctness associated with the used refinement. The potential of using FLiRTS is demonstrated on a simple case study. The results are promising and comparable to those obtained from a model-based approach (MaRTS) that requires detailed design models, and a code-based approach (DejaVu). Index Terms—fuzzy logic, model-based testing, regression test selection, UML models I. I NTRODUCTION The purpose of regression testing is to test a new version of a system to ensure that the performed modifications do not introduce new faults to previously tested code [1]. Regression testing is one of the most expensive activities performed during the lifecycle of a software system. Regression test selection (RTS) approaches are used to improve regression testing efficiency [1]. RTS is defined as the activity of selecting a subset of test cases from an existing test set to verify that the affected functionality of a program is still correct [1], [2]. RTS is performed by analyzing the changes made to a system at the code or model level. Existing model-based RTS approaches use design models [2], [3], [4], [5]. The use of model-based RTS approaches is growing, and will have crucial importance in the future. For large systems, model-based approaches can scale up better than code-based approaches [6]. Maintaining traceability between the model and the test cases is more practical than maintaining traceability between the code and the test cases because dependencies can be specified at a higher level of abstraction [2]. The effort required for regression testing can be estimated at an early phase, i.e., at design time, and before propagating the changes to the code [2]. Test selection is performed at the model level using standard and widely used modeling notations (e.g., UML), which can be mapped to multiple programming languages making the RTS approach more reusable. Despite the need for model-based RTS approaches, there is a major obstacle to the application of RTS at the model- level [2], [3], [4]. Models are generally created at a high level of abstraction and lack low-level details, such as use- and call-dependencies, which prevents relating the existing test cases to the models representing the system under test. This lack of traceability from requirements or design models to test cases is a known issue in model-based RTS, and is likely to severely limit its role [6]. This problem also makes it difficult to apply RTS in approaches that use design models to perform adaptation and validation at runtime, such as the DiVA project [7] that uses component-based models, which are specified at a high level of abstraction. As a workaround, the approaches proposed by Briand et al. [2], Farooq et al. [3], and Al-Refai et al. [5] require their models to be detailed and complete with respect to the implementation of the software system, and to contain enough information to obtain the coverage of model elements when test cases are executed, which is not always a common practice [2]. In these cases, the models are simply used as a different representation of the code. Another possible solution would be to use incomplete coverage information of the test cases at the model-level, which will lead to inaccurate results. To overcome this obstacle, we propose a new approach called FLiRTS that uses fuzzy logic to perform model-based RTS. The approach uses UML activity diagrams that model the behaviors of the system’s methods at a high level of abstraction, and UML sequence diagrams that model the system’s use case scenarios. In the activity diagrams, a single node can represent multiple code-level statements and its label can rarely be used to trace back to such a piece of code. This level of abstraction prevents relating the existing test cases to the activity diagrams as we will show in Section II. From the provided activity diagrams, FLiRTS automatically 2017 ACM/IEEE 20th International Conference on Model Driven Engineering Languages and Systems 978-1-5386-3492-9/17 $31.00 © 2017 IEEE DOI 10.1109/MODELS.2017.17 55