Font Size: a A A

Research On Test Case Generation Method For Mobile Testing

Posted on:2020-12-01Degree:MasterType:Thesis
Country:ChinaCandidate:J X SongFull Text:PDF
GTID:2428330575477342Subject:Computer technology
Abstract/Summary:PDF Full Text Request
Reasonable and effective testing is a necessary means to maintain the quality of App products.In the function test of the App based on the recording and playback framework,it is first necessary to record the operation of the tester on the mobile phone,generate a script based on the control information;then traverse the control in the script to generate a test path,and combined with the tester's input data,the functional test case is generated and stored in the local file;finally,the App function test is performed based on the data in the test case script.Whether the generated test case can cover all test paths directly affects the effect of the functional test.This paper designs a functional test case generation method based on the all paths coverage optimization(APCO)algorithm with the functional test case generation method as the entry point.It solves the problems of manual consumption of manual testing,length of time for generating test cases,low coverage of generated test cases,and low reusability of test cases.In the process of generating test cases,the depth-first search(DFS)algorithm is generally used to traverse the controls in the script.However,in this application,the problem of repeatedly traversing the invalid test path and the occurrence of an infinite loop during the traversal process in the actual application affects the test efficiency.This paper optimizes the DFS algorithm and uses the APCO algorithm to traverse the controls in the test script.The APCO algorithm marks the control in the invalid test path during the traversal of the control,and automatically skips when it traverses the control again.This not only ensures the depth of the generated functional test cases,but also improves the coverage of the functional test cases,and reduces the number of control traversal in the invalid test path during the traversal of the control,shortening the time consumption in the test case generation,and improving the efficiency of functional testing.In order to realize the function test generation method based on APCO algorithm,this paper also studies the following aspects:1?The functional test script is recorded using JNI technology.JNI technology directly converts testers' action events on the mobile screen into test scripts,and then converts coordinate-based scripts into scripts based on control information.The content of the script based on the control information is to match the event operation with the control information,so that the tester can edit the test script and extract the reference path in the function test process from the execution order of the control.2?The test case generated in this paper is composed of two parts: the operation event and the input data.On different Android devices,test case scripts generated by the same app can be applied directly without secondary editing.For different apps,you only need to modify the input data to continue to use,which solves the problem of low reusability of functional test cases.3?The combination of ADB tool and Socket ensures the connection between PC and mobile and realizes data transmission.Use the MonkeyRunner tool to simulate the tester's operation on the mobile side through shell commands,apply the functional test case to the test device,and feed back the results of the functional test.Finally,based on the APCO algorithm-based functional test case generation method,a prototype tool Framework-tools for Android system applications is implemented.The Framework-tools tool provides functional testing services for large,medium,and small applications.Test the timeliness,comprehensiveness,and reusability of the Framework-tools tool.The test results are in line with the expected results of this paper and meet the expected requirements of the functional test case generation method.
Keywords/Search Tags:Functional testing, Automated testing, Test cases, App testing, Software testing
PDF Full Text Request
Related items