The increasing complexity of new applications means GUIs are also getting more complex, and generating tests cases manually for them becomes harder. Generating automatic, good quality GUI test cases is a growing concern in application...
moreThe increasing complexity of new applications means GUIs are also getting more complex, and generating tests cases manually for them becomes harder. Generating automatic, good quality GUI test cases is a growing concern in application testing. Actions performed by the user on the GUI can be regarded as events, which can be performed in sequences, forming a graph of event sequences, and therefore multiple execution paths or routes, known as test cases, are possible. The quality of a set of test cases is measured by the coverage criteria (all actions or events must be performed at least one time in the set), which depend on the length and partial coverage of each execution path. Finding feasible paths and complying with the coverage criteria is a highly combinatorial problem. For such problems, due to high computing power that it would take to find an exact solution, it is well justified to use heuristics and metaheuristics algorithms, allowing us to find approximate solutions of good quality. Those methods have been successfully used in chemistry, physics, biology, and recently, in software engineering. In this paper, the use of a metaheuristic known as Ant Colony Optimization Algorithm (ACO) for generating test cases is proposed. The ACO metaheuristic has been adapted in order to find individual routes that could lead to a set of test cases of good quality. A individual test, path or route is desirable if it is long (it tests a lot of events or actions) and do not share events (or share few events) with other paths. After a appropriate number of candidate test cases are generated, we express the problem of generating a set of test cases as a set covering problem and then we apply a greedy algorithm to solve it. The result is a set of paths (test cases) with full covering of events with small number of test cases. We present also a problem solved by our method, generating test cases for Windows Wordpad, and discuss the results.