Font Size: a A A

Test Case Generation For Energy And Concurrency Bugs In Android Apps

Posted on:2018-07-23Degree:MasterType:Thesis
Country:ChinaCandidate:Q W LiFull Text:PDF
GTID:2348330512497194Subject:Computer Science and Technology
Abstract/Summary:PDF Full Text Request
Smartphones are an indispensable part of people's daily lives.The computing power of smartphones becomes stronger and stronger,and smartphones have an in-creasing number of equipped sensors.Smartphone apps employ lots of concurrency to improve the utilization of CPU and probe their users' physical environmental condi-tions to provide rich services.However,there are two important problems,i.e.,energy and concurrency bugs,that can negatively affect apps' quality,thus leading terrible user experience.Sensing operations can be energy-consumptive,and thus the obtained sensory data should be effectively utilized by apps for their users' benefits.Existing studies dis-closed that many real-world smartphone apps have poor utilization of sensory data,and this causes serious energy waste.To diagnose such energy bugs,a recent technique GreenDroid automatically generates sensory data,tracks their propagation and ana-lyzes their utilization in an app.However,we observe that GreenDroid's sensory data generation is random and this can improve its instability and reduce its effectiveness.As we all know,concurrent programs are notoriously difficult to write,test and debug.Android has provided a set of constraints to help developers from concurrency bugs.For example,GUI updates can only be taken in Main Thread.Unfortunately,as smartphone apps are being increasingly complicated,developers are unable to correctly understand app's behaviors and leave subtle concurrency bugs in the releases.Some existing work detects potential data races by building happens-before graphs with input events.However,they depend on those input events heavily,thus causing a high false-positive rate.In this thesis,we employ test case generation technology for detecting energy and concurrency bugs,i.e.,producing test cases based on the historical execution and cur-rent state of an app.To facilitate effective energy inefficiency diagnosis,we propose a novel approach to systematically generating multi-dimensional sensory data.For effec-tive diagnosis,we have also defined app state at a finer granularity.We implemented our approach as a prototype tool CyanDroid,and evaluated it using four real-world An-droid apps and hundreds of their mutants.Our results confirmed that CyanDroid is more stable and effective in energy inefficiency diagnosis for sensory data underutilization is-sues.On the other hand,we propose a novel approach to manifesting concurrency bugs in apps based on the fact that one can simultaneously generate input events and their schedules.We conduct static-dynamic hybrid analysis to find potentially conflicting resource accesses in an app.The app is then automatically tested by guided event and schedule generation.We implemented the prototype tool AATT and evaluated it with real-world open-source apps.The result demonstrates the effectiveness and efficiency of AATT.
Keywords/Search Tags:Android App Testing, Test Case Generation, Energy Bug, Concurrency Bug
PDF Full Text Request
Related items