基于GUI回归测试的机器学习和进化计算
Machine Learning and Evolutionary Computing for GUI-based Regression Testing
摘要:
ReTest是一种新颖的Java应用程序测试工具,它具有图形用户界面(GUI),结合了猴子测试和差异测试。由于这种组合避开了oracle问题,因此它能够生成基于GUI的回归测试。ReTest利用进化计算(EC),特别是遗传算法(GA),优化这些测试的代码覆盖率。虽然这在软件测试方面确实是一个理想的目标,并可能发现许多错误,但它缺少一个主要因素:人类行为。因此,人类测试人员经常发现结果不太合理,难以解释。本文提出了一种新的方法来改善初始种群的遗传算法与机器学习(ML)的帮助下,形成ML技术增强EC(MLEC)算法。为了做到这一点,利用现有的测试来提取关于人类测试人员如何使用给定GUI的信息。然后利用获得的数据来训练人工神经网络(ANN),该网络在运行时分别对可用的GUI操作及其底层GUI组件进行排名-减少手动创建和自动生成的回归测试之间的差距。尽管该方法是在ReTest之上实现的,但它可以很容易地用于指导任何形式的猴子测试。结果表明,只有很少的训练数据,人工神经网络是能够达到82%的准确性和由此产生的测试代表一个改进,而不会减少整体代码覆盖率和性能显着。
英文摘要:
ReTest is a novel testing tool for Java applications with a graphical user interface (GUI), combining monkey testing and difference testing. Since this combination sidesteps the oracle problem, it enables the generation of GUI-based regression tests. ReTest makes use of evolutionary computing (EC), particularly a genetic algorithm (GA), to optimize these tests towards code coverage. While this is indeed a desirable goal in terms of software testing and potentially finds many bugs, it lacks one major ingredient: human behavior. Consequently, human testers often find the results less reasonable and difficult to interpret. This thesis proposes a new approach to improve the initial population of the GA with the aid of machine learning (ML), forming an ML-technique enhanced-EC (MLEC) algorithm. In order to do so, existing tests are exploited to extract information on how human testers use the given GUI. The obtained data is then utilized to train an artificial neural network (ANN), which ranks the available GUI actions respectively their underlying GUI components at runtime---reducing the gap between manually created and automatically generated regression tests. Although the approach is implemented on top of ReTest, it can be easily used to guide any form of monkey testing. The results show that with only little training data, the ANN is able to reach an accuracy of 82% and the resulting tests represent an improvement without reducing the overall code coverage and performance significantly.
机构、总结、中文摘要均由AI分析而来,可能存在错误,请以论文正文为准。