计算机与现代化

• 软件工程 • 上一篇    下一篇

基于WEHG模型的GUI软件测试用例生成方法

  

  1. (南京航空航天大学计算机科学与技术学院,江苏南京211106)
  • 出版日期:2018-04-28 发布日期:2018-05-02
  • 作者简介:向日锋(1993),男,江苏南通人,南京航空航天大学计算机科学与技术学院硕士研究生,研究方向:软件自动化测试; 毛宇光(1962),男,江苏南京人,副教授,博士,研究方向:数据仓库,软件测试。

GUI Software Test Case Generation Method Based on WEHG Model

  1. (College of Computer Science and Technology, Nanjing University of Aeronautics and Astronautics, Nanjing 211106, China)
  • Online:2018-04-28 Published:2018-05-02

摘要: 图形用户界面(GUI)是底层代码的前端表示。针对基于现有的模型生成的测试用例集不能尽快找到软件缺陷的问题,本文从代码层和界面层出发对待测程序进行分析,提出一种GUI测试模型WEHG,该模型的特点是:1)根据事件处理函数中定义变量和引用变量的数量和给对应的节点设置权重值,从而保证拥有更多变量的节点能够优先生成测试用例;2)根据事件处理函数的定义引用对给节点之间的依赖关系设置依赖值,使依赖度高的节点能够优先加入测试序列中。对比实验结果表明,该方法能够更快地发现软件中的缺陷,提高测试用例的缺陷探测效率,降低软件测试的成本。

关键词: 图形用户界面, 测试用例生成, 软件测试

Abstract: The graphic user interface represents the frontend in the underlying code. In software development at this stage, the GUI accounts for over 60 percent of the total code. In view of the existing model based method to generate test cases can not find software defects as soon as possible, the paper embarks from the code layer and interface layer to analyze the test program, and puts forward a WEHG GUI test model. The model features are: 1) According to the number of the defined variables and reference variables of eventhandler and the corresponding node, we can set weight’s value, thus ensuring more variable nodes generate test cases preferentially; 2) According to the definition of the event handler function, the dependency value of the dependency on the node is set up, so that the node with high dependency can be first added to the test sequence. The experimental results show that this method can detect defects in software faster, improve the detection efficiency of test cases, and reduce the cost of software testing.

Key words: graphic user interface, test cases generating, software testing

中图分类号: