Font Size: a A A

Research On Automatic Test Method For Android Application Based On Particle Swarm Optimization Algorithm

Posted on:2017-05-01Degree:MasterType:Thesis
Country:ChinaCandidate:D G WangFull Text:PDF
GTID:2348330566956736Subject:Software engineering
Abstract/Summary:PDF Full Text Request
Test automation for Android is crucially important for the quality of applications.For traditional automated testing of Android application,there are still some problems such as the lack of automation,inefficiency of test case generation and the weakness of application exception discovery.Then this paper proposes an automatic test method for Android application based on Particle Swarm Optimization Algorithm(referred to as PSOA).PSOA mainly consists of three parts: getting information of widgets,modularity encapsulation of test methods and test case generation with test data optimization based on Particle Swarm Algorithm.For getting information of widgets,we get the device list firstly.Then through the socket communication with application under test we can use view server to obtain the activity list and the hierarchy tree of widgets.For modularity encapsulation of test methods,we encapsulate the basic test methods from present test automation framework according to the usual code Logic.For test case generation with test data optimization based on Particle Swarm Algorithm,we filter the results of hierarchy tree of widgets and construct a new tree for test case generation.Traverse the tree,match the modularize methods by the type of widget and generate the primary test case.Then use Particle Swarm Optimization Algorithm to optimize the test data and generate the final test cases.In the part of design and implementation,we choose Robotium as a test automation framework whitch provides basic test methods.We respectively implement Viewer,Test Method and PSO for getting information of widgets,modularity encapsulation of test methods and test case generation with test data optimization based on Particle Swarm Algorithm.Compare and analyze of the experimental results of traditional automated testing method and PSOA.We prove that PSOA is more efficent in dicovering application exceptions through the analysis of the number of the application exceptions discovered.We prove that PSOA is more efficient in test case generation through the analysis of the test cases generated per unit time.We prove that PSOA is more automatic by comparing each experimental procedure.Eventually we come to the conclusion.
Keywords/Search Tags:Android, test automation, PSOA, Particle Swarm Optimization Algorithm, Robotium
PDF Full Text Request
Related items