| 本文已被:浏览 4325次 下载 6767次 |
 码上扫一扫! |
|
|
| 一种基于事件处理函数的GUI测试方法 |
|
陈军成1,2,3, 薛云志1,2, 赵琛1,2
|
|
1.中国科学院 软件研究所 基础软件测评实验室, 北京 100190;2.中国科学院 软件研究所 基础软件国家工程研究中心, 北京 100190;3.中国科学院大学, 北京 100049
|
|
| 摘要: |
| 事件处理函数响应用户GUI(graphic user interface)操作并完成软件预定义功能,事件处理函数以及事件处理函数之间的关系实现是否与规约一致,是GUI 测试的重点.针对现有的基于模型GUI 测试用例自动生成过程中面临的测试用例规模庞大以及生成的测试用例无效问题,从分析事件处理函数的角度出发,提出了一种GUI 测试模型EHG.针对此模型,结合事件处理函数及其代码结构,提出了两个测试覆盖准则:完整最短路径覆盖准则和完整最短路径定义-引用对覆盖准则;利用基于反馈的测试用例生成技术生成测试用例.实验结果表明,针对较为复杂的应用,该方法不仅能够有效控制测试用例规模,消除无效测试用例,而且生成的测试用例能有效提高事件处理函数的代码结构覆盖率. |
| 关键词: GUI测试 事件处理函数 测试覆盖准则 测试用例生成 |
| DOI:10.3724/SP.J.1001.2013.04399 |
| 分类号: |
| 基金项目:国家自然科学基金(61100070);“核高基”重大专项(2009ZX01039-002-001);中国科学院战略性科技先导专项(XDA06010600) |
|
| Approach for GUI Testing Based on Event Handler Function |
|
CHEN Jun-Cheng1,2,3, XUE Yun-Zhi1,2, ZHAO Chen1,2
|
|
1.Laboratory of Fundamental Software Testing and Evaluation, Institute of Software, The Chinese Academy of Sciences, Beijing 100190, China;2.National Engineering Research Center for Fundamental Software, Institute of Software, The Chinese Academy of Sciences, Beijing 100190, China;3.University of Chinese Academy of Sciences, Beijing 100049, China
|
| Abstract: |
| EHF (event handler function) implements functionality of software and responds to user's operation on GUI (graphic user interface) element. GUI testing focuses on the conformance between specification and EHF as well as relations among EHFs. In order to solve the problems of large-scale of test cases and generation of invalid test cases, this paper proposes a new GUI test model named EHG based on event handler function. Using the model and the features of event handler functions, two test coverage criteria is constructed. Based on the criteria, a feedback-directed GUI test case generation is implemented. Experimental results show that the new approach not only effectively controls the scale of test case while eliminating invalid test cases, but also improves coverage of code structure. |
| Key words: GUI testing event-handler function test coverage criteria test case generation |