基于用例驱动的软件测试关键技术研究与应用
详细信息    本馆镜像全文|  推荐本文 |  |   获取CNKI官网全文
摘要
软件测试是软件开发过程中保证软件质量、提高软件可靠性、降低软件生产成本的关键技术手段。测试用例的生成是软件测试的一个关键环节,测试用例直接影响了软件测试的效率和覆盖率,可以说测试用例生成技术,已经成为了软件测试研究中的一个研究问题。
     UML是一种定义良好、易于表达、功能强大且普遍适用的统一建模语言,已经得到了非常广泛的应用。用例技术是UML中用于获取和表示需求的一种技术,而测试用例的生成又与软件需求有着密切的联系,因此,UML也为软件测试的研究提供了一个新的方向。本文研究的核心问题就是在用例驱动下的软件测试的相关技术和方法。
     本文在分析、研究软件测试的相关理论和技术、UML图形表示与特征等内容的基础上,通过对用例、UML顺序图等内容的分析与研究,提出了一种基于用例驱动的测试用例生成策略,其核心思想是通过用例来描述系统需求,并对其进行契约化描述,以消除自然语言表示的不确定性;结合UML顺序图生成测试场景;根据测试场景生成测试用例。针对这个策略,本文还详细论述了基于用例驱动的测试充分性、测试覆盖率、测试覆盖准则以及测试用例的可追踪性等相关技术问题。此外,对顺序图的形式化定义以及依据这种形式化定义实现测试用例自动生成的相关技术问题,也进行了较为深入的探讨。
     测试用例管理也是有效地实施软件测试的一个重要技术手段,因为有效的测试用例管理,有助于测试过程的跟踪、测试覆盖率的计算以及测试充分性的评估等技术手段的实现,它也是实现测试自动化的必要技术环节。为此,本文以软件项目管理系统的开发为例,设计并实现了一个测试用例管理系统,并就设计与实现中的相关技术和方法及其实现结果,进行了详细的论述。
Software test is the key to ensure the software quality,improve the software reliability and lower the software development cost,during the software development. The test case generation is an important aspect of software test. The complexity and quality of test cases assects test essiciency and overlay of the test process,so it becomes an active topic to research on the test case generation in software test.
    UML(Unified Modeling Language) is a modeling language that is well defined, expressive, powerful, and generally applicable. It has been used more and more widely and provides a new research direction for software test. Use case is a technology of gaining and expression requirement and closely related with test case. Use Case Driven Approach is a popular kind of software developping processes at present, and the core of this paper are the key technique of software test based on Use Case Driven.
    This paper firstly introduces the correlation knowledge theories of software test and the graphical representation and characteristic of UML, and analysis the Use Case and UML sequence diagram. The test case generation strategy is proposed to generate test case from use case, which represents requirement with use case. Use case is restrained with contract so as to eliminate the indetermination of the natural language. Then test scenarios is generated with sequence diagram and generates test case. We also provide the test sufficiency, the test coverage criterion and the test coverage fraction to the based Use Case-Driven, and also alleviate the test sequence in the certain degree to be possible execution question. In addition, sequence diagram is defined with formal method, which implements the related technical of the automated test case generation.
    Management of test case is the key technology of software test and helpful of test process trace, test coverage fraction computation and test sufficiency appraisal. To manage test case, we build a management tool-TCMS. In this tool, we focus on test cases. After TCMS is used in software test, not only can we manage test cases, but also can assure software quality.
引文
[1] 梅尔斯 等著,王峰,陈杰译.软件测试的艺术.北京:机械工业出版社,2006.
    [2] 沃特金斯著,贺红卫等译.实用软件测试过程.北京:机械工业出版社,2004.
    [3] 胡伯蒂(Dirk Huberty)等著,马博,赵云龙译.软件质量和软件测试.北京:清华大学出版社,2003.
    [4] 郑人杰著.计算机软件测试技术.北京:清华大学出版社,2003.
    [5] 张克东,庄燕滨.软件工程与软件测试自动化教程.北京:电子工业出版社,2002.
    [6] 华庆一,王斌君,陈莉译.面向对象系统的测试.北京:人民邮电出版社,2001.
    [7] 周伯生,冯学民,樊东平译.统一的软件开发过程.北京:机械工业出版社,2002.
    [8] Jeremiah Wittevrongel.SCENTOR:An automated test driver generator supporting e-business application develoPMent Design Specification. 2001,11.
    [9] Philippe Kruchte著,周伯生,吴超英,王佳丽译.Rational统一过程引论.北京:机械工业出版社,2002.
    [10] RogerS.Pressman著,梅宏译.软件工程—实践者的研究方法(第5版).北京:机械业出版社,2002.
    [11] 布奇,兰宝,雅各布著.邵维中,麻志毅译.UML用户指南.北京.人民邮电出版社,2006.
    [12] James Rumbaugh,Ivar Jacobson,Grady Booch著,姚淑珍,唐发根等译.UML参考手册.北京:机械工业出版社,2001.
    [13] James Rumbaugh,Muchael Blaha著.车皓阳,杨眉译.UML面向对象建模与设计(第2版).北京:人民邮电出版社,2006.
    [14] Ivar Jacobson,Pan-WeiNg著.徐锋译.AOSD中文版一基于用例的面向方面软件开发.北京:电子工业出版社,2005.
    [15] 谢卫宇,王恒山.基于用例驱动分析的软件需求获取方法.计算机与现代化,2002,86(6):36-40.
    [16] 叶斌.软件开发中的用例分析技术.微机发展.Sep.2004,Vol.14 No.9:128-121.
    [17] 黄雨田,聂丽琴,段富,何华军.用例需求分析技术的应用.太原理工大学学报.Mar.2005,Vol.36 No.2:225-227.
    [18] Richard Mitchell,Jim Mckim.著.孟岩译.Design by Concract原则与实践.北京:人民邮电出版社.2003.
    [19] Bertrand Meyer.Applying "Design by Contract".Interactive Software Engineering. 1992 IEEE.
    [20] 林佳一,刘进,何克清.面向对象的契约式程序设计.计算机应用.2005,Vol.25 No.4:796-798.
    [21] 程辉,卢正鼎,聂国梁,张茂元.基于契约式设计的CORBA异常机制测试方法研究.小型微型计算机系统.2004,Vol.25 No.11:2036-2039.
    [22] 邓际锋,张桂戌.在动态语言Lua中支持契约式开发计算机工程与应用.2006,19:73-76,107.
    [23] 阳小奇,刘坚.一种基于契约的跨过程安全分析方法.西安电子科技大学学报(自然科学版).2006,Vol.33 No.3:390-394.
    [24] 耿素云,屈婉玲.离散数学.北京:高等教育出版社,2004.
    [25] 王璐珍.UML顺序图的自动分析技术研究:(硕士学位论文).长沙:国防科学技术大学2002.
    [26] Xuandong Li and Johan Lilius. Checking Compositions of UML Sequence Diagrams for Timing Inconsistency.In Proceedings of 7th Asia-Pacific Software Engineering Conference (APSEC 2000),IEEE Computer Society Press,2000:154-161.
    [27] 江泽凡,王林章,李宣东,郑国梁.基于UML顺序图的测试方法.计算机科学.2004,Vol.31 No.7:131-136.
    [28] Jens Grabowski.Test Case Generation and Test Case Specification with Message Sequence Charts. IEEE Computer Society Press,2003:214-226.
    [29] OffuttA J,AbdurazikA .Generating Tests from UML specificstions.In :Proc. 2td Intl.Conf.on the Unified Modeling Language(UML '99).Fort Collins,CO,Oct. 1999.416-429.
    [30] Matthias Beyer, Winfried Dulz,Fenhua Zhen.Automated TTCN-3 Test Case Generation by means of UML Sequence Diagrams and Markov Chains. Proceedings of the 12th Asian Test Symposium (ATS'03) 1081-7735/03.2003 IEEE.
    [31] 谢棠棠.基于UML模型的测试场景生成研究与工具实现:(硕士学位论文).重庆:西南师范大学,2002.
    [32] Jon Whittle,Johann Schumann.Generating Statechart Designs From Scenarios.ICSE 2000 Limerick Ireland.
    [33] Silke Kuball, Gordon Hughes . Scenario-Based Unit Testing For Reliability.Safety Systems Research Centre,Bristol Ian Gilchrist .IPL Bath .2002 Proceedings Annual Reliability and Maintainablity Symposium.2002,IEEE.
    [34] 王洪媛,张可,张家晨.从Scenarios到状态图的算法分析.计算机应用研究,2006.
    [35] YeWu, Mei-HwaChen,JeffOffutt.UML-based Integration Testing for Component -based Software,The 2nd International Conference on COTS-Based Software Systems (ICCBSS),Ottawa, Canada,February 2003:251-260.
    [36] Hartmann J, Imoberdof C Meisenger M. UML-Based Integration Testing, ISSTA 2000 conference proceeding,Portland,Oregon,August 2000:60-70.
    [37] 史耀新,崔萌,李宣东,郑国梁.基于MDA的UML模型转换技术-从顺序图到状态图.计算机工程与应用,2004,13.
    [38] 黄陇,于洪敏,陈致明.基于UML顺序图的测试场景自动生成研究.计算机应用与软件,2006,23(4):31,116.
    [39] TSIOLAKIS A. Semantic Analysis and Consistency Checking of UML Sequence Diagrams JR]. Diplomarbeit, TU-Berlin: [TR2001-06],April 2001.
    [40] 沈剑乐,王林章,李宣东,郑国梁.一个基于UML顺序图的场景测试用例生成方法.计算机科学,2004.
    [41] 江泽凡.从UML顺序图模型生成测试用例:(硕士学位论文).南京:南京大学,2004.
    [42] WHITTLE J. Formal Approaches to Systems analysis Using UML:An Overview[J]. Journal of Database Management,2000,11 (4):4-13.
    [43] Stefania Gnesi,Diego Latella and Mieke Massink.Formal Test-case Generation for UML Statecharts.Proceedings of the Ninth IEEE International Conference on Engineering Complex Computer Systems Navigating Complexity in the e-Engineering Age 1050-4729/04. 2004 IEEE.
    [44] 伦立军,丁雪梅,李英梅。数据流测试准则之间关系的研究.计算机工程与应用,2005-4.
    [45] Amman P,Offutt J. Coverage criteria for logical expressions. In: Stephanie K,ed. Proc. of the 14th Int'l Symp. on Software Reliability Engineering. Denver: IEEE Computer Society Press,2003.99-107.
    [46] A .JOffutt, Shaoying Liu,YI WeiXiong.Criteria for Generating Speciation-based Tests In Proceedings of the Fifth IEEE International Conference on Engineering of Complex Computer Systems. 1999.
    [47] Atanas Rountev, Scott Kagan, and Jason Sawin. Coverage Criteria for Testing of Object Interactions in Sequence Diagrams.
    [48] 黎平.基于软件需求的测试用例生成的设计与实现,(硕士学位论文).大连.大连理工大学,2006.
    [49] Aynur Abdurazik, Paul Ammann, Wei Ding,A.J.Offutt. Evaluation of Three Specificationbased Testing Criteria.
    [50] 陈雪清.基于UML顺序图的集成测试用例生成:(硕士学位论文).吉林:吉林大学,2006.
    [50] Wee Kheng Leow,Siau Cheng Khoo, and Yi Sun.Automated Generation of Test Programs From Closed Specifications of Classes and Test Cases. Proceedings of the 26th International Conference on Software Engineering 0270-5257/04. 2004 IEEE.
    [51] 奚水清.基于UML的组件测试技术研究.西安:西北工业大学,2006.
    [52] 袁海,李宣东,郑国梁.从UML顺序图生成状态图的一个方法.计算机科学 2003 Vol.30 No.6:155-159.
    [53] OVERGAARD G. A Formal Approach to Collaborations in the Unified modeling Language[A]. In Proceedings of the Second IEEE International Conference on the Unified Modeling Language (UML99)[C]. IEEE Computer Society Press, 1999.99-11.
    [54] Falk Fraikin, Thomas Leonhardt.SeDiTeC - Testing Based on Sequence Diagrams. Software Engineering Research Group.Proceedings of the 17th IEEE International Conference on Automated Software Engineering (ASE'02): 1527-1366/02 2002 IEEE.
    [55] Mohammed Benattou, Jean_Michel Bruel,and Nabil Hameurlain. Generating Test Data from OCL Specification.Internal Research Report R21-02-01,Universite de Pau et des Pays de I'Adour France,April 2002.
    [56] Rex Black, Managing the Testing Process,Microsoft Press,1999.
    [57] ImranB ashir, AmritL.Goel.Testing Object-orientedS oftware:Life Cycle Solution,Springer-Verlag New York,Inc 1999:86-94.
    [58] 徐晓涛,洪帆.办公自动化系统中基于RBAC的授权模型.通信技术,2003,4:87-89.
    [59] 阎冰洁,汪小兰,熊前兴.基于B-B-C电子商务模式的用户权限控制.计算机应用研究.2006:第9期:127-130.
    [60] 阎宏.JAVA与模式.北京:电子工业出版社,2004.
    [61] 宗平,阴凌燕,张艳丽等.基于J2EE的Oracle数据库连接研究与实现.计算机应用研究,2002,卷(08):73-96.
    [62] KevinMukhar,ToddLauinger,Jhon Carmelletal.Java数据库应用程序编程指南,北京:电子工业出版社,2002.
    [63] 王立娟.基于过程的软件测试管理中关键技术的研究.(硕士论文).大连:海事大学 2006.
    [64] http://www.51testing.com/
    [65] http://www.testage.net/

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

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

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