Font Size: a A A

Detecting Environmental Adaptability Defects For Android Applications

Posted on:2021-02-11Degree:MasterType:Thesis
Country:ChinaCandidate:Y LiuFull Text:PDF
GTID:2428330647951051Subject:Computer Science and Technology
Abstract/Summary:PDF Full Text Request
Smartphone applications are vital in people's lives,but application defects are also common,seriously affecting user experiences.Although the types of application defects are complex,many application defects can be attributed to the changing environment of smartphones.This type of application defects triggered by the environment are named environmental adaptability defects.This paper focuses on the research problem of environmental adaptability defect detection of Android applications.These application defects are often difficult to locate for developers due to their complicated triggering factors.Thus,automated testing and detection tools are needed.Existing work can only detect a specific environmental adaptability defect,without a general problem analysis and detection approach.This paper find that the application defects can be linked to the environment through application resources,after the analysis of the inherent principle of environmental adaptability defects.The environment acts on the resources in an application,affects the property of some resources,and then triggers application defects.According to this finding,this paper proposes a design framework of test oracles for environmental adaptability defects.This framework links the application's defects with environment from the perspective of resources.Using this framework,we can start with environmental adaptability related resources,and design specifications for an application by determining the properties of resources and the resource management capabilities that the application should have.This paper demonstrates the detection approaches and tools obtained by applying this framework to two specific environmental adaptability problems,in order to prove the effectiveness of this test oracle design framework.First,we apply the test oracle design framework to the detection of energy inefficiency problems in Android applications,and propose the Navy Droid tool.Among the rich functions provided by Android applications,many require energy consuming operations.If these operations are not performed properly,much energy will be wasted without user benefits,resulting in energy inefficiency.Using the test oracle design framework to analyze energy inefficiency problem,we can conclude that such defects involves power consumption resources such as sensors,which are easy to leak.Therefore,we design energy inefficiency patterns from the perspective of resource lifecycle management capabilities.At runtime,the application's resource lifecycle management capabilities are evaluated by determining whether the states of resources are consistent with the states of application components.The Navy Droid approach simulates the lifecycle states of application components with an accurate application execution model,and design a complete suite of energy inefficiency patterns from the perspective of resource lifecycle management.Navy Droid has detected 17 energy inefficiency defects from real-world Android applications,and has improved detection effectiveness and efficiency compare to existing work.Second,we apply the test oracle design framework to the detection of changing network induced problems in Android applications,and propose the ANIP tool.Among the rich functions provided by Android applications,many depend on network access.The complex and variable network environments of smartphones often influence application functions,and trigger application defects.The defects induced by changing network conditions have various forms,and are difficult to locate and repair.Using the test oracle design framework to analyze these network defects,we can conclude that such defects involves network connection resource,which is intermittent and volatile.Therefore,we determine whether an application and resist the change of network connection state and maintain its normal function when facing adversary network conditions from the perspective of resource state management capabilities.ANIP constructs adversary network conditions based on original test cases,and simulates network condition changes by inserting network events.At runtime,the application's resource state management capabilities can be evaluated by tracking application functions during and after the adversary network condition.ANIP determines whether the application has restored its normal functions by designing metamorphic relations for application be-haviors,and comparing application behaviors in two runs.The ANIP tool has triggered and detected network Defects from real-world Android applications,some of which are confirmed and fixed by developers.The two tools,Navy Droid and ANIP,focus on different specific defects in environmental adaptability defects,and propose effective approaches for specific defects.The test oracle design framework plays an important role in the construction of approach and the design of application specifications of the two tools,demonstrating the effectiveness of the test oracle design framework presented in this paper.
Keywords/Search Tags:smartphone application, bug detection, environment adaptability
PDF Full Text Request
Related items