Font Size: a A A

Use Behavior Testing Of Android Application Services

Posted on:2022-02-12Degree:MasterType:Thesis
Country:ChinaCandidate:C S QianFull Text:PDF
GTID:2518306755451384Subject:Software engineering
Abstract/Summary:PDF Full Text Request
Service is one of the four major components of Android application.It mainly runs in the background of the application and can realize multiple functions.Services are mostly invisible to users,but they can keep running for a long time and play an important role.Therefore,when there is a defect in the service or the service is used improperly,it may cause problems such as application crash and rapid resource consumption.The current research on Android application testing mainly focuses on the GUI testing methods of Android applications.There are few researches on service testing,and they have certain shortcomings,because it is difficult to find the defects related to the usage of services when the application is running.In order to solve the above problems,this paper proposes a service usage behavior testing method that combines static analysis and dynamic analysis.The basic idea of the method is to obtain information related to service usage by staticlly analyzing the code of application,which is used to provide guidance when testing applications dynamically in order to test service usage in applications directly and find real service-related defects.Based on the above ideas,this paper designs and implements a prototype tool ASTDroid.The tool mainly contains two modules: static analysis and automated testing.The main function of the static analysis module is to locate the service usage in the application,collect broadcast information related to the service usage,and construct the trigger path for the service usage.The automated test module implements a goal driven exploration strategy,which uses the service-related broadcasts and service usage trigger paths obtained by static analysis to assist in exploring applications,so as to achieve the purpose of quickly and comprehensively testing the service usage in the application.This paper takes 60 real Android applications as experimental objects,and uses code coverage,defect discovery capabilities and testing time as measurement indicators to evaluate the effectiveness and efficiency of the method proposed in this paper.At the same time,the coverage of service usage statements under the same test time is used as the evaluation standard to conduct comparative experiments with the industry's advanced Android application testing tools.Experimental results show that the average test time of ASTDroid is about 15 minutes,and it can cover 62.84% of the service usage,which is 19.85% to 32.79% higher than the comparison tool.In addition,ASTDroid found 26 service usage-related flaws in 24 applications,including 2 serious flaws that could cause application crashes,proving the effectiveness of the tool ASTDroid.
Keywords/Search Tags:Android Application, Service, Static Analysis, Broadcast, Automatic Test
PDF Full Text Request
Related items