Thesis Template
Total Page:16
File Type:pdf, Size:1020Kb
Automated Testing: Requirements Propagation via Model Transformation in Embedded Software Nader Kesserwan A Thesis In The Concordia Institute For Information System Engineering Presented in Partial Fulfillment of the Requirements For the Degree of Doctor of Philosophy (Information and Systems Engineering) at Concordia University Montreal, Quebec, Canada March 2020 © Nader Kesserwan 2020 ABSTRACT Automated Testing: Requirements Propagation via Model Transformation in Embedded Software Nader Kesserwan, Ph.D. Concordia University, 2020 Testing is the most common activity to validate software systems and plays a key role in the software development process. In general, the software testing phase takes around 40-70% of the effort, time and cost. This area has been well researched over a long period of time. Unfortunately, while many researchers have found methods of reducing time and cost during the testing process, there are still a number of important related issues such as generating test cases from UCM scenarios and validate them need to be researched. As a result, ensuring that an embedded software behaves correctly is non-trivial, especially when testing with limited resources and seeking compliance with safety-critical software standard. It thus becomes imperative to adopt an approach or methodology based on tools and best engineering practices to improve the testing process. This research addresses the problem of testing embedded software with limited resources by the following. First, a reverse-engineering technique is exercised on legacy software tests aims to discover feasible transformation from test layer to test requirement layer. The feasibility of transforming the legacy test cases into an abstract model is shown, along with a forward engineering process to regenerate the test cases in selected test language. Second, a new model-driven testing technique based on different granularity level (MDTGL) to generate test cases is introduced. The new approach uses models in order to manage the iii complexity of the system under test (SUT). Automatic model transformation is applied to automate test case development which is a tedious, error-prone, and recurrent software development task. Third, the model transformations that automated the development of test cases in the MDTGL methodology are validated in comparison with industrial testing process using embedded software specification. To enable the validation, a set of timed and functional requirement is introduced. Two case studies are run on an embedded system to generate test cases. The effectiveness of two testing approaches are determined and contrasted according to the generation of test cases and the correctness of the generated workflow. Compared to several techniques, our new approach generated useful and effective test cases with much less resources in terms of time and labor work. Finally, to enhance the applicability of MDTGL, the methodology is extended with the creation of a trace model that records traceability links among generated testing artifacts. The traceability links, often mandated by software development standards, enable the support for visualizing traceability, model-based coverage analysis and result evaluation. iv Acknowledgments Foremost, I would like to express my sincere gratitude to my supervisor Dr. Rachida Dssouli for the continuous support, patience, motivation and advice. Her guidance helped me conducting this study, communicating with academics and writing of the Thesis. I could not have imagined having a better or friendlier supervisor. It is also an honor for me to express my deep thanks to my co-supervisor Dr. Jamal Bentahar. His valuable and immense comments and advices gave me more insight through the research area. I would also like to thank my committee members, Dr. Ferhat Khendek, Dr. Roch Glitho, Dr. Abdessamad Ben Hamza for serving as my committee members. I also want to thank you for letting my defence be an enjoyable moment, and for your brilliant comments and suggestions, thanks to you. I am also grateful to Dr. Bernard Stepien in University of Ottawa, his help in offering me technical advices in building tools is much counted and appreciated. I wish to extend my warmest thanks to Pierre Labrèche manager at Esterline CMC Electronics who have helped me with my research in offering me advices, lab access and providing me with all needed documents. Wishing you all the best in your new retired life. I owe my loving thanks to my wife Rima and my kids Rami, Sami and Nada. It would have been impossible for me to finish this study without their continuous support, encouragement and understanding. v Table of Content LIST OF TABLES ..................................................................................................................................................... IX LIST OF FIGURES ..................................................................................................................................................... X LIST OF ILLUSTRATIONS ....................................................................................................................................... XII ABBREVIATION ................................................................................................................................................... XIII CHAPTER 1 INTRODUCTION ................................................................................................................................... 1 1.1 RESEARCH MOTIVATION ........................................................................................................................................ 1 1.2 NEW APPROACH: MDTGL .................................................................................................................................... 4 1.3 THESIS CONTRIBUTION .......................................................................................................................................... 6 1.3.1 Contribution 1: Reverse-Engineering the Legacy Software Tests to Model-Driven Testing ................... 7 1.3.2 Contribution 2: MTDGL Methodology .................................................................................................... 7 1.3.3 Contribution 3: Theories and Techniques Supporting ............................................................................ 8 1.3.4 Contribution 4: Illustrative Experiments Validating MTDGL .................................................................. 9 1.3.5 Issues Not Addressed in this Thesis ........................................................................................................ 9 1.4 THESIS OUTLINE ................................................................................................................................................. 10 CHAPTER 2 LITERATURE REVIEW .......................................................................................................................... 12 2.1 TOPIC OVERVIEW ............................................................................................................................................... 12 2.2 SOFTWARE TESTING ............................................................................................................................................ 13 2.3 TESTING TYPES .................................................................................................................................................. 13 2.4 MODEL-DRIVEN ARCHITECTURE (MDA) ................................................................................................................. 15 2.5 MODEL-BASED TESTING (MBT) ........................................................................................................................... 16 2.6 MODEL TRANSFORMATION .................................................................................................................................. 17 2.6.1 Definition ............................................................................................................................................. 18 2.6.2 Model Transformation Categories ....................................................................................................... 19 2.6.3 Design Features for Model Transformation ......................................................................................... 21 2.6.4 Model Transformation from UCM ....................................................................................................... 27 2.7 TEST CASE GENERATION ...................................................................................................................................... 29 2.7.1 MBT Technique .................................................................................................................................... 30 2.7.2 Specification-Based Technique ............................................................................................................ 32 2.7.3 NL Technique ........................................................................................................................................ 33 2.8 TRACEABILITY .................................................................................................................................................... 34 vi 2.8.1 Requirement Traceability ..................................................................................................................... 34 2.8.2 Traceability in MDD ............................................................................................................................