• 中国计算机学会会刊
  • 中国科技核心期刊
  • 中文核心期刊

J4 ›› 2008, Vol. 30 ›› Issue (5): 142-146.

• 论文 • 上一篇    下一篇

基于事件流图的GUI自动化测试系统的开发

陆永忠[1] 余幸花[1] 聂松林[2] 裴小兵[1] 汪春[1]   

  • 出版日期:2008-05-01 发布日期:2010-05-19

  • Online:2008-05-01 Published:2010-05-19

摘要:

针对目前GUI自动化测试方法中存在着一定程度的手工依赖性以及对测试用例和测试覆盖率缺乏系统管理等问题,本文结合Microsoft UI Automation框架开发了一个基于事件流图的GUI自动化测试系统。该系统先对被测标准GUI进行逆向工程以得到GUI的事件流图和期望的结果,然后分别采用基于蚁群算法的日常冒烟测试用例生成算法和基于宽度优
先搜索的深度回归测试用例生成算法生成测试用例,并用这些生成的测试用例来测试新的GUI。测试结果表明,该GUI自动化测试模型是切实可用的,为在Windows环境下提高GUI测试的自动化程度提供了一种更为有效的途径。

关键词: 软件测试自动化 图形化用户界面 事件流图

Abstract:

In the software industry, nowadays automatic testing methods are widely used in GUI testing, which largely depends on manual work, and features low ad  aptability to software variation, and lacks systematic management as to testing cases and coverage. Accordingly, a more highly automated GUI testing sys tem which is based on event-flow graphs is proposed under the framework of Microsoft UI Automation, where the automation tool is first used to carry out  the reverse engineering for testing samples so as to obtain a majority of event-flow graphs and expected testing results. During the process of the formation of the testing cases, two strategies are adopted. For the daily smoke testing, an ant colony optimization algorithm is used to go through all theevent points in the event-flow graphs and establish a sequence as a testing case. For the deep regression testing, a spanning tree obtained by the goal-directed searching approach is explored to obtain the testing cases from the goal point to the outset point. And these cases are applied to test the new GUI. The results of experiments illaminate that the   improvement for the GUI testing automation in Windows systems.

Key words: automatic software testing, graphic user interlace, event-flow graph