计算机应用 ›› 2010, Vol. 30 ›› Issue (10): 2749-2753.

• 软件过程技术与先进计算 • 上一篇    下一篇

基于运行监测的图形用户界面自动化测试模型

张博刚1,张威1,陈月宁2,廖飞雄3   

  1. 1. 装甲兵工程学院
    2. 第二炮兵指挥学院通信系
    3. 装甲兵工程学院信息工程系
  • 收稿日期:2010-04-12 修回日期:2010-05-12 发布日期:2010-09-21 出版日期:2010-10-01
  • 通讯作者: 张博刚

Graph user interface automatic testing model based on software monitoring

  • Received:2010-04-12 Revised:2010-05-12 Online:2010-09-21 Published:2010-10-01

摘要: 为提高GUI自动化测试的覆盖率、故障定位的速率和精度,以及检测由于时空变化导致的空间错误引起的故障,建立基于运行监测的GUI自动化测试模型。模型将GUI分为窗口框架层、界面元素层、功能结构层和运行记录层四层。窗口框架层描述GUI所有窗口,界面元素层描述用户输入,功能结构层提出功能覆盖准则,运行记录层通过插桩记录代码动态监测软件每一次执行时路径和各个窗口的运行状态,从而提高测试的覆盖率,并根据运行记录中窗口的总执行次数和正确的执行次数为可靠性计算提供依据。由于监测代码的运行情况,因此故障能够定位到代码级,提高故障定位的精度和速率。最后以记事本程序为例验证了模型的有效性。

关键词: 窗口导航, 有向图, 运行监测, GUI测试, 运行记录, 循环展开

Abstract: In order to improve the coverage and efficiency of locating faults and defect the faults in running repetitiously in Graph User Interface (GUI) automatic testing, a GUI automated testing model based on software monitoring was proposed. The model divided GUI into four-layers: windows framework layer, interface element layer, functional structure layer and running record layer. The windows framework layer described all windows and controls in GUI, the interface element layer described all input events, the functional structure layer described the rule of functional coverage, and the running record layer monitored the software dynamically in each running trace and window through instrumentation codes, so as to increase the test coverage, provide basis for reliability calculation according to the total and correct operation in running record window. Finally, notepad was taken as the example to verify the model's efficiency.

Key words: window navigation, directed graph, software monitoring, GUI testing, running record, loop unwinding

中图分类号: