In the information age, the role of software in our lives is becoming increasingly important,and Android application is particularly evident. However, since the business logic and development process of the current softwares has become much more complex than before, this inevitably leads to an increase in software defects. With the increase in the size of the software and the increase in the number of regression tests, the cost of software testing will be greatly increased. Therefore, how to reduce the workload of the testing process has become the focus of current software testing issues.Reducing the test suite is an effective way to reduce the execution cost of the test cases in regression tests. For the problem of the test suite reducing, this paper gives an improved ant colony(HGS-ACO)algorithm to solve the problem. The algorithm uses the idea of HGS algorithm to give each test case "importance", and the initial pheromone concentration is set by importance information of test case. Then the ant colony algorithm is performed to search with variable coefficient,and some issues such as the test case selection and pheromone update mechanism are analyzed and designed during the search process. Finally, the five programs in the SIR system and their test suites were used to experimental results verify the validity of the proposed algorithm in the problem of test suite reduction.In the actual test, it is usually necessary to find the defects of the software under test as soon as possible in a limited time. To solve this problem, this paper designs a dynamic adjustment algorithm for test cases based on two attributes and hierarchical adjustment(TA&HA).The algorithm first divides the original test suite according to the specified attribute, then correlation matrix is built by test cases’ attribute; meanwhile, the correlation matrix that with coupling relationship is decoupled. And assign the lift levels of the test cases to be adjusted, adjust test cases dynamically according to the adjustment rules while executing. Finally, the proposed algorithm is applied to test cases execution process of an Android project which belongs to the open source site Google Code. The comparison of test data shows that the algorithm could enhance the pertinence of selecting the test cases that to be adjusted ,and it also shorten the running time in finding defects.Automated testing is an effective means of improving test efficiency. However, traditional automated tests can only execute test cases statically in accordance with the default sorting of test tools, and can not dynamically adjust the order of test cases. This paper combines the automation testing framework(Robotium) of Android application, add the proposed algorithm to the automated execution of test cases, and modify the file writing mode of test results data so that it could generate the test reports that synthesize multiple test cases execution processes. To facilitate the use of testers, a test case execution tool is designed and developed for Android applications, which achieves the unity of executing automation and adjusting automation of test cases for Android applications. |