@phdthesis{16131, author = {Tao Ma}, title = {Executable Model Based Testing for Self-Healing Cyber-Physical Systems Under Uncertainty}, abstract = {Self-healing is becoming a critical feature of Cyber-Physical Systems (CPSs). By detecting faults and applying recovery adaptations at runtime, self-healing behaviors can help CPSs to maintain functional normal in the presence of faults. CPSs with the self-healing feature are named as Self-Healing CPSs (SH-CPSs). Besides recovery, SH-CPSs have to deal with various uncertainties, such as measurement errors from sensors and actuation deviations from actuators. To assess the dependability of SH-CPSs, it is necessary to test if SH-CPSs can still behave as expected under uncertainty. However, the autonomy of self-healing behaviors and the impact of uncertainties make it challenging to conduct such testing. To this end, an executable model-based testing approach is proposed in this thesis. In this approach, the expected behaviors of the SH-CPS under test are specified as an executable test model. By executing the SH-CPS together with the test model, sending them the same test inputs, and comparing their consequent states, we can dynamically test the system against its test model.To realize this executable model-based testing approach, five contributions have been made and are presented in this thesis: (C1) a Conceptual Model of SH-CPS and Uncertainty (CMSU), for constructing a comprehensive and precise understanding of CPS, self-healing and associated uncertainty; (C2) a Modeling framework of SH-CPS (MoSH), to facilitate the creation of an executable test model that captures the expected behaviors of the SH-CPS under test; (C3) a testing framework (TM-Executor), for testing an SH-CPS against a test model via co-execution of the system and the model; (C4) a Fragility-Oriented Testing (FOT) approach, to learn the optimal policies of choosing test inputs for fault detection; (C5) an empirical study, to find the best reinforcement learning algorithms for detecting faults in the SH-CPS under uncertainty.By applying MoSH to create executable test models and employing TM-Executor and FOT to test diverse SH-CPSs, we demonstrate that it is practical to apply the executable model-based approach to test SH-CPSs under uncertainty. The fault detection ability of the fragility-oriented testing approach is significantly higher than random testing and coverage-oriented testing. Reinforcement learning algorithms have shown competence in detecting faults in SH-CPSs under uncertainty. Based on results of the empirical study, we found that the combination of Q-learning and Uncertainty Policy Optimization algorithms managed to detect the most faults in selected six SH-CPSs. On average, they managed to discover two times more faults than the other reinforcement learning algorithms.}, year = {2021}, journal = {University of Oslo}, volume = {Ph.D.}, pages = {193}, }