基于模型的GUI测试工具的实现研究
详细信息    本馆镜像全文|  推荐本文 |  |   获取CNKI官网全文
摘要
图形用户界面(GUI)是软件的重要组成部分。在软件系统的交互中,GUI被广泛的使用,变得越来越复杂,由此引发的GUI测试问题也越来越具有挑战性。但是,GUI的测试目前依然是一个较少研究的领域。由于GUI软件和传统的软件有许多不同的特点,如以用户事件作为输入、图形化的输出等,这使得传统软件的测试技术不能直接应用于GUI软件的测试。针对GUI测试的这个问题,为了实现GUI测试的自动化,本文在已有研究的基础上给出了一个通用的GUI事件表示方法,扩展了已有GUI测试模型的定义,补充了GUI测试覆盖准则。
     当前流行的GUI测试工具自动化程度不高、过度依赖于测试人员,大大影响测试的效率。结合改进的模型自动化程度高的优点,本文设计和实现了一个基于模型的GUI测试工具。给出了该工具的主要结构、工作流程以及测试信息的XML Schema结构。着重研究了各个功能模块的设计、实现过程中涉及的关键技术及其实现,包括图形用户界面的自动剖析、GUI测试模型的自动构建、测试用例的执行等。最后,通过一个基于Java开发的记事本,介绍了该测试工具在实际中的应用和实际效果。
Graphical User Interface (GUI) is a critical component of today’s software. The widespread use of GUIs for interacting with software is leading to that the GUI become more and more complex. With the growing complexity come challenges in testing the correctness of a GUI. But, GUI testing remained a neglected research area. Since GUI software has characteristics that are different form conventional software, such as user events as input and graphical data as output, techniques developed to test conventional software cannot be directly applied to test GUI software. With the particular goals of automation of GUI testing, this dissertation introduction a improved GUI test model based on the existing research .In the modal, we present a new GUI event present which is more universal. Furthermore, we extend the definition of the test model and complement the GUI test coverage.
     The popular existing GUI test tools have many deficiencies, for example low automation and depending on the test engineer seriously, which influence the efficiency. This dissertation design and implement a GUI test tools based on the model which integrate the merit of model. We introduce the main structure and work flow of the tools, the XML Schema of the test information. The dissertation research the key technology in the implementation of the tool’s function, including: GUI ripper, automation constructed of the model and auto run of the test cases; Lastly, through a case of Notepad developed based on Java, this test tool is demonstrated how to be applied in practice. The value of test model is validated.
引文
[1] Paul C.Jorgensen,软件测试(韩柯等译),北京,机械工业出版社,2003
    [2] Elfriede Dustin,有效软件测试(新语等译),北京,清华大小出版社,2003
    [3] Perry,W,Effective Methods for Software Testing,John Wiley&Sons,Inc.,New York, 1995.
    [4] A.Memon,GUI Testing:Pitfalls and Process,Software Technologies,2002,87-88
    [5] Myers,B.A, Hollan,J.D, Cruz,I.F,Strategic directions in human-computer interaction.ACM Computing Surveys ,1996,28(4): 794-809
    [6] A.M.Memon,M.E.Pollack, M.L.Soffa,Hierarchical GUI Test Case Generation Using Automation Planning”,IEEE Trans. Software Eng,2001,27(2):144-155
    [7] David Lee, Mihalis Yannakakis,Principles and methods of testing finite state machines-a survey,Proceeding of the IEEE,1996,84(8):1090-1123
    [8] T.S Chow,Testing software design moedeled by finite-state machines,IEEE trans. On software Engineering 1978,178-187
    [9] Shehaby R,Siewiorek D, A Method to Automate User Interface Testing Using Variable Finite State Machines,Proc.of the 27th Int. Symposium on Fault Tolerant Computing,Seattle,WA,1997-06:80-88
    [10] White L,Almezen H,Generating Test Cases for GUI Responsibilities Using Complete Interaction Sequence , Int.Symp. on Software Reliability Engineering , San Jose CA ,2000-10:110-121
    [11] White L,H.AlMezen,N.Alzeidi,User-based Testing of GUI Sequence and Their Interaction,Proc.12th Int’l Symp. Software Reliability Eng,2001,54-63
    [12] Fevzi Belli, A Holistic View for Finite-State Modeling an Testing of User Interactions,2003
    [13] Ping Li,A Two Tiered approach to methodical GUI testing,[university of Alberta Master paper],Edmonton, University of Alberta,2004
    [14] P.Stocks D.Carrington,A framework for specification-based testing,IEEE Transon Software Engineering,1996,22(11):773-793
    [15] J. Chen,S. Subramaniam, A GUI environment to Manipulate FSMs for Testing GUI-based Application in Java, Proceedings of the 34th Annual Hawaii International Conference on System Sciences, 2001.
    [16] J.Chen,S.Subramaniam, Specification-based Testing for GUI-based Applications,Software Quality Control,2002,10(3):205-224
    [17] Yanhong Sun, Edward L.Jones, Specification-driven automated testing of GUI-based Java programs, Proceedings of the 42nd annual Southeast regional Conference, 2004,140-145
    [18] 顾玉良 王立福,界面类对象建模技术研究,计算机工程,1999,25(7):21-23
    [19] 刘超,程序交互执行流程图及其测试覆盖准则,软件学报,1998,9(6):458-463
    [20] 杜栓柱 谭建荣 陆国栋,基于界面构建关联图的软件功能测试技术,计算机研究与发展,2002,39(2):148-152
    [21] 李翔 高建华,一种基于事件关系的图形用户界面程序测试方法,小型微型计算机系统,2005,26(4):671-675
    [22] 吕格峰 邹北骥 周浩宇 孙家广,一种针对交互式软件的测试用例生成模型研究与实现,小型微型计算机系统,2006,27(1):131-135
    [23] 周浩宇 邹北骥 吕格峰,CADTesting 的设计与实现,工程图学学报,2004,4:36-40
    [24] 刘昶 刘超,面向人机交互式软件的测试模型建模方法,沈阳航空工业学院学报,2005,22(2):32-35
    [25] Paoulo Pinherio da Silva, Norman W.Paton,User Interface Modeling in UMLi, IEEE Software, 2003,62-69
    [26] Paoulo Pinherio da Silva, Norman W.Paton,User Interface Modeling with UML,Information Modeling and Knowledge Bases XII,IOS Press,2001,203-217
    [27] P.Markopoulos,Pmarijnissen, UML as a Representation for Interaction Designs,Proc Australian Conf. Computer-Human Interaction,CHSIG,2000,240-249
    [28] J.M.ALmendros,L.Iribarne,Designing GUI components from UML Use Cases,ECBS05,2005
    [29] Nuno Jardim Nunes, Representing User-Interface Pattens in UML,Springer-verlag Berlin,2003
    [30] 孙晓平 魏明珠等,基于 UML 的图形用户界面交互行为的设计,计算机工程与应用,2003,119-122
    [31] X.Li,W.B.Mugrige,Petri Net Based Graphical User Interface Specification Tool,Proceedings of Software Engineering Education and Practice Conferende,1994,50-57
    [32] X.Li,W.B.Mugrige,John G.Hosking,A Petri Net-based Visual Language for Specifying GUIs,IEEE,1997,50-57
    [33] X.Li , W.B.Mugrige,John G.Hosking , A Petri Net-based Environment for GUI Design,IEEE,1997,2234-2239
    [34] A.M.Memon,M.E.Pollack,M.L.Soffa,Using a Goal-Driven Approach to Generate Test Cases for GUIs,Proc.21st Int’l Conf. Software Eng,1999-05:257-266
    [35] A.M Memon,M.Pollack,M.L.Soffa,Plan Generation for GUI Testing,the 5th Int.Conf.on Artificial Intelligence Planning and Scheduling,Brechenridge,CO,2000-04:226-235
    [36] A.M.Memon,A comprehensive framework for testing graphical user interfaces,[University of Pittsburgh PhD thesis], Pittsburgh, University of Pittsburgh,2001
    [37] A.M Memon,M.Pollack,M.L.Soffa,Coverage Criteria for GUI Testing,ESEC/FSE ,2001,256-267
    [38] A. Memon,A. Nagarajan,Q. Xie, Automating Regression Testing for Evolving GUI Software,J. Software Maintenance and Evolution: Research and Practice,2005, 17(1):27-64
    [39] Stree L, Test for GUI Programs,Datamation1992,38(18):37
    [40] Hammontree M L,Hendrickson J J,Integrated data capture and analysis tools for research and testing a graphical user interfaces,Proc.Conf. Human Factors in Computing Systems,1992:431-432
    [41] Mercury WinRunner,http://www.mercuryinteracive.com/procducts/winrunner,2006
    [42] Z Yin,C.Y Chao, Y Miao,Actionable Knowledge Model for GUI Regression Testing,Proceedings of the 2005 IEEE Internation Conference on Intelligent Agent Technology,2005
    [43] Robert V.Binder,面向对象系统的测试(华庆一等译),北京,人民邮电出版社,2001
    [44] 颜炯 王戟 陈火旺, 基于模型的软件测试综述,计算机科学,2004,31(2):184-187
    [45] L.Apfelbaum, John.Schroeder, Reducing the Time to Thoroughly Test a GUI, Software Quality Week Conference,1998
    [46] Tao Jiang,A new approach in GUI Testing[D],Minnesota:University of Minnesota,2002
    [47] W.K Chen,T.H Tsai,H.H Chao,Integration of Specification-based and CR-based Approcah for GUI Testing,Proceeding of the 19th International Conference on Advanced Information Networking and Application,2005
    [48] Jemmy Document, http://jemmy.netbeans.org/documentation.html,2002
    [49] Jemmy Testting Toolkit, www.ociweb.com/javasig/knowledgebase/2005-03/Jemmy Testing Toolkit.ppt
    [50] 朱鸿 金凌紫,软件质量暴涨与测试,北京,科学出版社,1997
    [51] Xrunner,www.mercury.com/us/products/xrunner/,2006
    [52] Robot,www.ibm.com/software/awdtools/tester/robot/,2006
    [53] Rational Visual Test,www.ibm.com/software/awdtools/visualtest/support/index.html,2006
    [54] SilkTest,www.borland.com/us/products/silk/silktest/index.html,2006
    [55] Kanglin Li Mengqi Wu,图形用户界面测试自动化(王轶昆等译),北京,电子工业出版社,2005
    [56] SourceForge, http://www.sourceforge.org,2006
    [57] Gilad Suberri,Automated Reverse Engineering of Graphical User Interface, http://www.cs.umd.edu/Honors/reports/GiladReport.pdf,2006
    [58] A.Memon,I.Banerjee,A.Nagarajan,GUI Ripping:Reverse Engineering of Graphical User Interface for Testing,Proc.10th Working Conf. Reverse Eng. 2003,260-269
    [59] Java API,java.sun.com,2006
    [60] 卢正鼎 范小丹,XML 模式到 UML 类图的转换规则,计算机工程,2006,32(10):53-57
    [61] Ayesha Malik , Design XML Schemas Using UML ,http://www-128.ibm.com/developerworks/library/x-umlschem/index,2003
    [62] W3C Proposed Recommendation , XML Schema Part 2: Datatypes, http://www.w3c.org/TR/2001/PR-xmlschema-2-20010330,2001
    [63] 严蔚敏 吴伟民,数据结构,北京,清华大学出版社,1997
    [64] Thomas.H.Cormen,Charles E.Leiserson,算法导论(潘金贵等译),北京,机械工业出版社,2006
    [65] 郭昕 张强 文秀林 芦东昕,JFCunit 在图形用户单元测试中应用,计算机应用,2003,23:385-386
    [66]林晋 刘克勤柳长安,JFCunit 在图形用户界面单元测试中的应用与自动化实现,现代电力,2004,21(6):70-74
    [67] 谢煜涛 左雪梅,用 JFCunit 对 GUI 图形用户界面进行单元测试,中国测试技术,2005,31(3):78-80
    [68] 许赞泉,针对图形用户界面的软件测试研究,硕士学位论文,南京航空航天大学,2003
    [69] Harrold M J,Offurt JA,Tewary K,An approach to fault modeling and fault seeding using the program dependence gragh,The Journal of Systems and Software,1997, (3):273-296
    [70] A.M. Memon,I.Banerjee, A. Nagarajan,What Test Oracle Should I Use for Effective GUI Testing, Proc.IEEE Int’l Conf.Automated Software Eng.,2003:164-173
    [71] T.Ostrand,A.Anodide,H.Foster, A Visual Test Development Environment for GUI Systems,ISSIA 98,1998
    [72] D.J.Johnson,P.Roselli,Using XML As a Flexible,Portable Test Script Language,IEEE, 2003,187-192
    [79] 吴恒山 王金红,基于界面状态有效性的 GUI 自动测试模型,华中科技大学学报,2004,32(12):34-36
    [80] 叶茂 高海昌,基于窗口导航有向图的 GUI 测试覆盖准则,西南交通大学学报,2006,41(4):476-480
    [81] 杨凡德 李小将,GUI 自动测试工具设计与实现,装备指挥技术学院院报,2003,14(3):77-80