基于UML的面向对象软件测试方法的研究
详细信息    本馆镜像全文|  推荐本文 |  |   获取CNKI官网全文
摘要
随着面向对象软件开发方法的广泛应用,面向对象软件测试方法也得到了人们的广泛重视。由于面向对象自身的特征,传统的测试方法已不再适用于面向对象的软件测试,因此,必须找出一种适合于面向对象软件的测试方法,这便给测试增加了难度。本文以面向对象软件的特点为依据,讨论了面向对象软件测试层次划分和测试方法等问题,并提出了一种测试用例生成的具体解决方法。
     统一建模语言UML具有定义良好、易于表达,功能强大的特点,同时还提供了非常强大的图例模型。它不仅支持面向对象的分析和设计,而且支持从需求分析开始的软件开发的整个过程,这就为UML引入到面向软件测试中提供了可能。
     测试用例生成是软件测试的核心问题之一,所以将测试用例设计作为本文研究的重点。本文将UML与统一软件开发过程(RUP)有效结合起来,针对面向对象软件测试的各个阶段特点,在RUP迭代的基础上,采用不同的UML图来讨论测试各个阶段中测试用例的生成方法。其中重点讨论了类簇级测试阶段的测试用例生成方法,该方法以分析、设计阶段的顺序图为基础;然后结合顺序图中交互的类的状态图合并成组合状态图;最后对组合状态图进行优化,在优化后的状态图的基础上生成测试用例。该方法完全基于UML,利用分析、设计阶段的图例,摆脱了由于编码阶段引入的错误而导致测试用例错误的情况。
With the broadly used of the Object-Oriented developing method, the Object-Oriented Software testing is getting more and more attention by man. In virtue of Object-Oriented Software's features, the traditional Software testing methods are not adapt to the Object-Oriented testing, make the Software testing more difficult. Based on the characteristics of object-oriented software, the article discusses the testing layers and methods for Object-Oriented Software testing and generates the specific solutions for test case.
    The Unified Modeling Language (UML) is more defined and easy to describe the Software. At the sometimes, the UML affords a lot of graph model. It is not only backup the OOA and OOD, but also the whole procedure from the demand to development. It is possible to lead UML into Software testing.
    In Software testing, the design of generating cases testing is the key point. So, I put it as the emphases in the article. This paper will effectively combine the UML and Rational Unified Process (RUP), in RUP on the basis of iterative, introduce different UML diagrams aim at the object-oriented features of the various phases of software testing and discuss the methods of the different stages of the test case generation. There into, the emphasis of research is clusters testing. The method on the base of the analysis, the design phase sequence diagram; then, combine class's state diagram in the sequence interactive diagram to combined state diagram; finally, with the combined state diagram optimizing, and the test case generation on the basis of it. The UML-based method of using analysis of the design stage diagram avoids the mistakes that are made by introducing the phase coding errors on the testing.
引文
[1] 朱鸿,金陵紫.软件测试和质量保障技术.北京:科学出版社,1997.
    [2] M.J. Harrold and G. Rothermel. "Performing data flow testing on classes".In2 d AC M-SIGSOFT Symposium on the foundations of software engineering, pages 154-163, New Orleans, LA(USA),December 1994.
    [3] C.D. Tumer and D.J. Robson, "The State-Based Testing of Object-Oriented Programs", in Proc. IEEE Conf. On Software Maintenance, (Los Almitos,USA),pp. 302-310,1993.
    [4] D. Kung, N. Suchak, P. Hsia, Y. Toyoshima, andC. Chen, "Onobject state testing", Proc. Of COMPSAC'94, pp.222-227, IEEE Computer Society Press, 1994.
    [5] 张庆,雷航.一种基于UML状态图的面向对象类级测试模型.计算机工程,2005.11,31(21):75~77.
    [6] Huo yan Chen(陈火炎),T. H Tse. and T. Y. Chen. "TACCLE: a methodology for objected-oriented software testing at the class and cluster levels", ACM Transactions on Software Engineering and Methodology, 2001, 10(1):56-109.
    [7] 宫云战著.软件测试.北京:国防工业出版社,2006.01.
    [8] 王林章,李宜东,郑国梁.一个基于UML协作图的集成测试用例生成方法.电子学报,2004,32(8):1290-1296.
    [9] 苏荟,张毅坤,姚海波等.基于UML顺序图的面向对象软件簇级测试.计算机工程,2005.12,31(24):78-80.
    [10] G. J. Myers, The Art of Software Testing, John Wiley, New York(1979).
    [11] Hetzel, B. (1988),The Complete Guide to Software Testing, 2nd edn, QED Information Sciences Inc.
    [12] 徐宏喆 陈建明等.UML自动化测试技术.西安:西安交通大学出版社,2006.
    [13] Beizer. Black-Box Testing: Techniques for Functional Testing of Software and Systems. New York: John Wiley & Sons, Inc1995.
    [14] 袁洁松,王林章,李宣东等.UMLTGF:一个基于灰盒方法从UML活动图生成测试用例的工具.计算机研究与发展,2006,43(1):46-53.
    [15] Hung Q. Nguyen. Testing Application on the Web: Test Planning for Internet Based Systems. New York: John Wiley & Sons Inc, 2003.
    [16] David C. Kung, Pei Hsia, Jerry Gao, Testing Object-oriented Software[C], IEEE Computer Society, 1999.
    [17] (美) Robort V.Binder著;华庆一,王斌君,陈莉 译.面向对象系统的测试.北京:人民邮电出版社,2001.
    [18] 绍维忠,梅宏.统一建模语言UML述评.计算机研究与发展,1999,36(4):385-394.
    [19] (美) Joseph Schmuller著:李虎 等泽.UML基础、案例与应用.北京:人民邮电出版社,2002.3.
    [20] (美) James Rumbaugh等著.UML参考手册.北京:机械工业出版社,2000.
    [21] (美) Eriksson,H.E等著.余安萍等译.UML 2 Toolkit.北京:电子工业出版社,2004.10.
    [22] Grady Booch, lvar Jacobson, and James Rumbaugh, Unified Modeling Language 1.3, White paper, Rational Software Corp, 1998.
    [23] Rational Corporation, Rational unified process best practices for software development teams, A rational software corporation white paper, 1998.
    [24] Jim Arlow,Ila Neustadt 著.方贵宾 胡辉良泽.UML 2.0和统一过程.北京:机械工业出版社,2006.6.
    [25] Philippe Kruchten, A Rational Development Process, CrossTalk, 9(7), STSC, Hill AFB, UT, PP. 11-16.
    [26] 林宏,曾一.基于UML的面向对象软件测试框架.重庆大学学报,2003,26(8):43-46.
    [27] (美) Wendy Boggs,Michael Boggs著,邱仲潘等译.UML与Rational Rose2002从入门到精通.北京:电子工业出版社,2002.7.
    [28] Paul C. Jorgensen, Software Testing: A Craftsman's Appr-oach [M],CR C Press, Inc, 1995.
    [29] 马伟.面向对象软件簇级测试用例自动生成方法与实现(硕士学位论文).西安理工大学.2005.3.
    [30] 苏荟.基于UML的面向对象软件簇级测试方法研究(硕士学位论文).西安理工大学.2005.3.
    [31] 张力昂著.计算机理论导引.北京:机械工业出版社,2000.02.
    [32] 郑欣鑫.面向对象软件测试的研究(硕士学位论文).长春理工大学.2004.12.
    [33] 严蔚敏,吴伟民编著.数据结构(第二版).北京:清华大学出版社,1999.
    [34] (英) Ian Sommerville著.程成 陈霞等译.软件工程.北京:机械工业出版社,2003.1.
    [35] 刁华丽.基于UML的集成测试用例生成方法的研究与应用(硕士学位论文).大连理工大学.2005.12.
    [36] 翼振燕 著.UML系统分析设计与应用案例.北京:人民邮电出版社,2003.6.
    [37] 刘正高.软件可靠性工程评述.电子产品可靠性与环境实验,1999:15-18.
    [38] Edward Kit著.李新华,陈丽容等译.软件测试过程改进.北京:机械工业出版社,2003.
    [39] Perry, WilliamE. Effective Methods for Software Testing. New York City:John Wiley&Sons, 2000.
    [40] P. C. Jorgensen and C. Erickson, "Object-Oriented Integration Testing", Communications of the ACM, vol. 37(9), pp. 30-38,1994.
    [41] Graham, Dorothy, MarkFewster. Software Test Automation:Effective Use of Test Execution Tools. Boston,Mass:Addison-Wesley, 2000.
    [42] 郑人杰著.计算机软件测试技术.北京:清华大学出版社,1992.
    [43] jim Arlow,Ila Nenstadt著.李侃等译.UML和统一过程实用面向对象分析和设计.北京:机械工业出版社,2003.
    [44] Ivar Jacobson,Grady Booch,James~-Rumbaugh著.周伯生等译.统一软件开发过程.北京:机械工业出版社,2002.
    [45] Rational Rose@. Using the rose extensibility interface. http://www.cs.rhul.ac.uk/Internal/ComputerS/rational/html/rose_REI_guide/REIUsersGuideTOC.html,2001.
    [46] Object Management Group. UML Specification 1. 5. http://www.omg.org/docs/formal/03-03-01.pdf, 2003-03-01/2004-06-01
    [47] http://www.rational.com
    [48] http://www.faq-it.org/archives/software_test
    [49] UML 1.1 Documents, Rational Rose98 Product and Other Products. Rational Corporation. http://www.rational.com

© 2004-2018 中国地质图书馆版权所有 京ICP备05064691号 京公网安备11010802017129号

地址:北京市海淀区学院路29号 邮编:100083

电话:办公室:(+86 10)66554848;文献借阅、咨询服务、科技查新:66554700