节点文献

图形用户界面测试中相关问题研究

The Study of Program Test for Graphical User Interface

【作者】 钱思佑

【导师】 杨寿保; 蒋凡;

【作者基本信息】 中国科学技术大学 , 信息安全, 2010, 博士

【摘要】 图形用户界面(Graphical User Interfaces, GUI)是当今软件系统中人机交互过程中不可或缺的部分,在软件系统中起着极其重要的作用。GUI基于事件驱动模式,其程序执行顺序依赖于外部输入事件的顺序,这与传统的顺序执行软件:有着本质的不同。软件测试在保证软件质量上有着不可替代的作用,但是因为GUI基于事件驱动致使事件处理程序之间的执行顺序不确定,传统软件的测试方法无法照搬到GUI测试上。本文以GUI事件交互关系以及事件与系统状态之间的关联关系为着眼点,研究GUI测试方法,主要的研究内容和贡献如下:1.GUI测试模型测试模型是软件测试的核心所在,GUI测试也不例外,本文通过分析GUI事件之间的变量共享,确定GUI事件之间的交互关系,提出了描述GUI事件之间交互关系的GUI事件交互架构。另外,分析GUI事件与GUI系统状态之间的关系,通过描述GUI事件对GUI系统状态的修改进而描述这两者之间的关联关系,并扩展GUI事件交互架构得到事件-状态关联模型。2.GUI测试用例生成事件之间的交互关系基于共享变量,而共享变量的实质是变量中的数据传递,即事件之间的交互关系通过变量的定值和使用关系来实现。本文提出了基于事件交互架构的GUI测试用例生成方法,该方法通过程序分析得到每个事件的事件处理程序的程序流图,然后再通过程序流图分析到达一定值数据流方程进而给出测试用例的形式化描述,提出了基于事件交互架构和事件处理程序中数据流分析的GUI测试用例生成算法。讨论了针对GUI特点的测试覆盖准则,以及根据GUI测试覆盖准则指导测试用例生成。3.GUI测试评判生成GUI测试用例数量多,且测试评判信息随测试用例变化而变化,使得GUI的测试评判信息的生成需要巨大的人员和系统开销,本文在GUI模型的研究中所提出的事件-状态关联模型描述了GUI事件对GUI系统状态的修改,通过按照测试用例中的事件序列可依次计算出针对每个测试用例的测试评判信息。

【Abstract】 GUI, which is short for Graphical User Interfaces, plays a key role in current software systems as a necessary part of man-machine interaction. The execution orders of GUI programs depend on the order of input events based on event-driven mode, which is essentially different from the traditional orders.Software testing is irreplaceable in software quality assurance, but the traditional testing methods can’t be applied to GUI testing due to the uncertainty of execution orders between event-handler programs caused by the event-driven GUIs. This paper studies on GUI testing methods, focusing on the interaction relations among GUI events and interaction relations between events and system states.1. GUI testing modelAs testing models being the core of software testing, they are also the core of GUI testing. This paper analyzes the sharing variants among the GUI events, points out their interaction relations between GUI events, and proposes an event-interactive architecture describing these relations. Besides, this paper also analyzes the relations between GUI events and GUI system states, describes these interaction relations by means of describing the GUI events modification on GUI system states, and then, extends this architecture to get event-state relation model.2. GUI test case generationThe interaction relations of events are based on sharing variants, while the essence of sharing variants is the data transmission among them, in other words, the interaction relations of events are decided by the values and using relations of variants. This paper proposes a method of test case generation for GUI based on the event-interactive architecture. This method obtains the event-handler program flow charts of every event, then, gives the formal description of test cases by analyzing the arrival-value data flow equations using these flow charts, and proposes the test case generation algorithm for GUI based on this event-interactive architecture and the data flow analysis of event-handling programs. At the same time, discusses the coverage criterion according to the features of GUI.3. GUI test oracles generationThere are too many GUI test cases, and the test oracle information varies with the test cases, leading to a great staff and overhead system costs. The event-state relation models proposed by this paper describe the GUI events modification on GUI system states, and the test oracle information of every test case can be calculated in turn according to the event order in them.

节点文献中: