Journal of Systems Engineering and Electronics ›› 2009, Vol. 31 ›› Issue (1): 174-177.

• 软件、算法与仿真 • 上一篇    下一篇

GUI自动化测试用例生成策略的研究

陆永忠1, 汪春1, 聂松林2   

  1. 1. 华中科技大学软件学院, 湖北, 武汉, 430074;
    2. 华中科技大学机械科学与工程学院, 湖北, 武汉, 430074
  • 收稿日期:2007-10-20 修回日期:2008-05-17 出版日期:2009-01-20 发布日期:2010-01-03
  • 作者简介:陆永忠(1969- ),男,副教授,博士,主要研究方向为软件工程,人工智能.E-mail:hotmailuser@163.com
  • 基金资助:
    国家自然科学基金(50675074,50775081);华中科技大学自然科学基金(2007Q006B)资助课题

Study on generation strategies of GUI automation testing cases

LU Yong-zhong1, WANG Chun1, NIE Song-lin2   

  1. 1. School of Software Engineering, Huazhong Univ. of Science & Technology, Wuhan 430074, China;
    2. School of Mechanical Science and Engineering, Huazhong Univ. of Science & Technology, Wuhan 430074, China
  • Received:2007-10-20 Revised:2008-05-17 Online:2009-01-20 Published:2010-01-03

摘要: 针对目前在图形用户界面(graphic user interface,GUI)自动化测试方法中存在的手工依赖性和测试缺乏准确性等问题,提出了一种改进的GUI自动化测试算法。该算法包括两种基于事件流图的GUI自动化测试用例生成策略:基于蚁群算法的日常冒烟测试用例生成策略和基于宽度优先搜索生成树的深度回归测试用例生成策略。将这两种策略应用于没有考虑分层的GUI事件流图模型中,得到标准GUI的测试用例,然后再进行GUI测试。结合Microsoft UI Automation框架和Visual Studio 2005开发平台,对该算法进行了实验研究。研究表明:该算法可以提高GUI测试的自动化程度和准确性。

Abstract: Aiming at the present problems in the course of GUI automation test such as large dependence on manual work,lack of testing accuracy and so forth,an improved automated GUI testing algorithm is proposed.It includes two strategies based on its event-flow graph: a daily smoke testing strategy based on the ant colony optimization algorithm(ACO) and a deep regression testing strategy based on the spanning tree algorithm.Two strategies are applied to the non-hierarchical GUI event-flow graph,and the standard testing cases are obtained.Then GUI test is done.With the help of Microsoft UI Automation and Visual Studio 2005,a testing study on the proposed algorithm is done.The studying results show that it can improve the automation and accuracy of GUI test.

中图分类号: