
UC Irvine UC Irvine Electronic Theses and Dissertations Title Advancing Energy Testing of Mobile Applications Permalink https://escholarship.org/uc/item/4vs7z6f2 Author Jabbarvand Behrouz, Reyhaneh Publication Date 2020 License https://creativecommons.org/licenses/by-nc/4.0/ 4.0 Peer reviewed|Thesis/dissertation eScholarship.org Powered by the California Digital Library University of California UNIVERSITY OF CALIFORNIA, IRVINE Advancing Energy Testing of Mobile Applications DISSERTATION submitted in partial satisfaction of the requirements for the degree of DOCTOR OF PHILOSOPHY in Software Engineering by Reyhaneh Jabbarvand Dissertation Committee: Professor Sam Malek, Chair Professor Cristina Videira Lopes Associate Professor James A. Jones 2020 © 2020 Reyhaneh Jabbarvand DEDICATION To my beloved husband and daughter, Alireza and Nora ii TABLE OF CONTENTS Page LIST OF FIGURES vii LIST OF TABLES ix ACKNOWLEDGMENTS x CURRICULUM VITAE xi ABSTRACT OF THE DISSERTATION xiii 1 Introduction 1 1.1 Dissertation Overview . .4 1.2 Dissertation Structure . .6 2 Background 8 2.1 Methodology . .9 2.1.1 Search Protocol . .9 2.1.2 Search Process . 12 2.1.3 Threats To Validity . 13 2.2 Defect Model . 14 2.2.1 Connectivity . 14 2.2.2 Display . 18 2.2.3 Location . 19 2.2.4 Recurring Constructs . 20 2.2.5 Sensor . 21 2.2.6 Wakelock . 21 2.3 Analysis . 23 2.3.1 RQ1: Distribution of Energy Defects . 23 2.3.2 RQ2: Misused Resource Type . 26 2.3.3 RQ4: Consequences of Energy Defects . 28 2.4 Discussion . 31 3 Related Work and Research Gap 32 3.1 Related Work . 32 3.1.1 Regression Testing . 32 iii 3.1.2 Test Adequacy Criterion . 34 3.1.3 Mutation Testing . 35 3.1.4 Android Testing . 36 3.1.5 Test Oracle . 37 3.1.6 Green Software Engineering . 38 3.2 Research Gap . 40 4 Research Problem 44 4.1 Problem Statement . 49 4.2 Research Hypotheses . 50 5 Energy-Aware Mutation Testing 53 5.1 Introduction . 53 5.2 Framework Overview . 56 5.3 Mutation Operators . 58 5.3.1 Location Mutation Operators . 60 5.3.2 Connectivity Mutation Operators . 61 5.3.3 Wakelock Mutation Operators . 65 5.3.4 Display Mutation Operators . 65 5.3.5 Recurring Callback and Loop Mutation Operators . 66 5.3.6 Sensor Mutation Operators . 66 5.4 Analyzing Mutants . 68 5.4.1 Killed Mutants . 68 5.4.2 Equivalent and Stillborn Mutants . 71 5.5 Evaluation . 72 5.5.1 Experimental Setup and Implementation . 73 5.5.2 RQ1: Prevalence, Quality, and Contribution . 76 5.5.3 RQ2: Effectiveness . 77 5.5.4 RQ3: Association to Real Faults . 80 5.5.5 RQ4: Accuracy of Oracle . 81 5.5.6 RQ5: Performance . 82 5.6 Discussion . 83 6 Energy-Aware Test Input Generation 85 6.1 Introduction . 85 6.2 Illustrative Example . 88 6.3 Approach Overview and Challenges . 90 6.4 Model Extractor . 93 6.4.1 Component Transition Graph (CTG) . 93 6.4.2 Lifecycle State Machine (LSM) . 97 6.4.3 Hardware State Machine (HSM) . 98 6.5 Test Generator . 101 6.5.1 Genetic Algorithm . 101 6.5.2 Genetic Operators . 103 6.5.3 Fitness Evaluation . 108 iv 6.5.4 Test-Suite Minimization . 110 6.6 Evaluation . 110 6.6.1 Experimental Setup . 112 6.6.2 RQ1: API and Execution Context Coverage . 113 6.6.3 RQ2: Effectiveness . 114 6.6.4 RQ3: Necessity of the Models . 115 6.6.5 RQ4: Energy Defects Coverage . 117 6.6.6 RQ5: Performance . 118 6.7 Discussion . 118 7 Energy-Aware Test Oracle 120 7.1 Introduction . 121 7.2 Motivating Example . 123 7.3 Approach Overview . 125 7.4 Sequence Collector . 127 7.4.1 State Vector (SV) . 127 7.4.2 Collecting Sequences . 129 7.5 Learning Engine . 130 7.5.1 Model Selection . 131 7.5.2 Long Short-Term Memory (LSTM) . 132 7.5.3 Dataset Curation . 134 7.5.4 Attention Mechanism . 135 7.6 Attention Analysis . 136 7.7 Evaluation . 140 7.7.1 Experimental Setup . 140 7.7.2 RQ1: Effectiveness . 144 7.7.3 RQ2: Usage of Attention Mechanism . 146 7.7.4 RQ3: Detecting Unseen Defect Types . 148 7.7.5 RQ4: Reusability of the Oracle . 149 7.7.6 RQ5: Performance . 151 7.8 Discussion . 152 8 Energy-Aware Test-Suite Minimization 153 8.1 Introduction . 154 8.2 Motivation . 156 8.3 Energy-Aware test-suite Minimization . 159 8.4 Approach Overview . 161 8.5 Energy-aware Coverage calculator . 162 8.6 energy-aware test-suite minimization . 165 8.6.1 Integer Non-linear Programming . 165 8.6.2 Integer Linear Programming . 168 8.6.3 Greedy algorithm . 170 8.7 Experimental Evaluation . 173 8.7.1 Experiment Setup . 173 8.7.2 RQ1: Effectiveness . 174 v 8.7.3 RQ2: Correlations . 177 8.7.4 RQ3: Performance . 178 8.8 Discussion . 181 9 Conclusion 183 9.1 Research Contributions . 184 9.2 Future Work . 188 Bibliography 192 vi LIST OF FIGURES Page 2.1 Proposed taxonomy of energy defects.
Details
-
File Typepdf
-
Upload Time-
-
Content LanguagesEnglish
-
Upload UserAnonymous/Not logged-in
-
File Pages222 Page
-
File Size-