用户名: 密码: 验证码:
基于UML的面向对象的类测试研究
详细信息    本馆镜像全文|  推荐本文 |  |   获取CNKI官网全文
摘要
在软件工程领域中,面向对象软件是一个重要的研究方向。本文从面向对象方法的特点出发,分析了面向对象软件测试中测试层次、测试内容、测试用例设计等主要问题。
     面向对象软件测试即在测试过程中继续运用面向对象技术,进行以对象概念为中心的软件测试。就测试而言,面向对象系统的测试与其它方法开发的系统的测试没有什么本质差别,但面向对象软件测试通过捕捉面向对象分析和面向对象设计模型信息,可以检查程序与模型不匹配的错误,这一点是传统软件测试难以达到的。在所有开发系统中都是根据规范说明来验证系统设计的正确性,但面向对象开发方法为测试带来某些新的可能性,也引出某些新问题。面向对象的特征,如封装性、继承性、多态和动态绑定等,这些特征的引入增加了测试的复杂性。
     统一建模语言UML具有定义良好、易于表达、功能强大的特点,不仅支持面向对象的分析与设计,而且支持从需求分析开始的软件开发的全过程。UML的目标是以面向对象的方式来描述任何类型的系统。它提供了非常丰富的图例模型。本文的工作是在系统的各种图例模型的基础上构造系统的测试模型,在现有技术条件下,在分析面向对象技术和UML技术在测试中的特点的基础上,把具有面向对象特征的形式化方法应用到面向对象软件测试中,针对使用UML技术开发的面向对象软件构造更加严格的测试方法和流程。
     最后,作者将该文提出的测试方法,应用于一个应用软件自动取款机(ATM)模拟系统中ATM类的类测试,讲述了具体的测试实施过程。
Object-oriented software testing is an important research work in software engineering domain now. I analysis the testing layers for Object-Oriented software testing content, and testing case in the article.
    The Object-Oriented software testing is the same as using Object-Oriented technique to test the software focusing on object concepts during testing procedure. To testing, there is not any essential difference between Object-Oriented testing and other systems testing developed by other methods, but Object-Oriented software testing can detect the mismatching error of programs and models by capturing the models information of Object-Oriented analyzing and designing. However, it's difficult for traditional software testing to get it. The design correctness is proved according to specification in all developing system, but some new possibilities brought by Object-Oriented developing methods and elicit some new questions. The Object-Oriented characters, such as encapsulation, inheritance, polymorphism and dynamic binding etc, increase the testing complexity.
    Unified Modeling Language (UML) is well defined, it is easy to express, and it has powerful functions. UML not only supports Object-Oriented analyzing and designing, but also supports the whole procedure of the software development for the requirement analyzing. The UML objective is to describe any kind of system in Object-Oriented diagrams. UML provides very rich diagram model, the article provides reliable testing methods of constructing the testing model of a system on the basis of all kinds of diagram models. Textual work is to construct system-testing model, which every kind of diagram model in system based on. Under the current technique term, in OOA technique condition, author put formalization methods which have Object-Oriented characteristics into use in Object-Oriented software test. Aim at Object-Oriented software to use the technique of UML to develop more strictly test methods and process.
    Finally, author put the test method forward to a class test use to withdraw money automatically in applied software the machine (ATM) imitate system, and describe the detail of test process.
引文
[1] CraigLarman,UML和模式应用:面向对象分析与设计导论[M].北京:机械工业出版社,2001.
    [2] IVARJ, GRADYB, JAMESR,统一软件开发过程[M].北京:机械工业出版社,2001.
    [3] JOHNDM, TIMOTHYDK, Integrated Object-oriented Testing and Development Process[J]. Communications of the ACM. 1994
    [4] GRADYB, JAMESR, IVARJ. The Unified Modeling Language User Guide[M]. Chicago: AddisonWesley, 1999
    [5] ROBERTVB,面向对象系统的测试[M].北京:机械工业出版社,2001.
    [6] KIMYG, HONGHS, BAEDH. Test Cases Generation from UML State Diagrams[J]. IEEE Proceeding on Software. 1999
    [7] SANDRAP, WEYUKEREJ. Selecting Software Test Data Using Data Flow Information[J]. IEEE Transactions on Software Engineering. 1985
    [8] PHYLLISGF, WEYUKEREJ. An Applicable Family of Data Flow Testing Criteria[J]. IEEE Transaction on Software Engineering. 1998
    [9] [德]Sinaa si Alhir.UML高级应用[M]清华大学出版社,2004
    [10] Kirani s, Tsai W T, Method Sequence Specification and Verification of Classes. Journal of Object-Oriented Programming, 1994;
    [11] Jorgensen P C, Erickson C. Object-Oriented Integration Testing. CACM,1994;
    [12] Parrish A S, Borie R B, Cordes D W. Automated Flow Graph-Based Testing of Objest-Oriented Software Modules. J.Systems Software,1993;
    [13] Weyuker E J. More Experience with Data Flow Testing.IEEE Trans on Software Engineering,1993;
    [14] Frankl P G, Weyuker E J. Provable Improvements on Branch Testing.IEEE Trans on Software Engineering,11993;
    [15] Doong R, Frankl PG. The ASTOOT approach to testing object-oriented programs.ACM Transactions on Software Engineering and Methodology,1994;
    [16] Coad P, Yourdon E,面向对象的设计(北大中译本),北京大学出版社,1994;
    [17] 郑人杰,计算机软件测试技术,清华大学出版社,1992;
    [18] 金凌紫,面向对象软件测试技术进展。计算机研究与发展,1998.1
    
    
    [19] 郭健强,蔡希尧,一种检查面向对象程序中数据流异常的方法,计算机研究与发展,2000.6
    [20] 陈咏章,朱学勤,沈文武,基本路径测试在类方法测试中的应用,CTC'2000
    [21] 顾玉良,王立福,面向对象软件测试过程研究.计算机科学,1999.4
    [22] 曹鸿飞,李毓膦,事件驱动编程环境下的界面状态的集中控制.计算机工程,2000.9
    [23] 张纲,葛卫民等,事件驱动面向对象的软件白盒测试法初探,计算机工程,2000.9
    [24] 顾玉良,王立福,吕慧颖,面向对象软件测试的关键问题及对策.计算机科学,1999.11
    [25] 郑人杰,软件工程(高级),清华大学出版社,1999
    [26] 于卫,郭建强,蔡希尧,陈平.OO软件的测试,西安电子科技大学学报,1998.12
    [27] 杨小平,王胜开,面向对象软件测试探讨,计算机工程与应用,2000.1
    [28] 张海藩,软件工程导论,清华大学出版社,1998
    [29] Meilier Page-Jones著,包晓露 译,UML面向对象的设计基础,人民邮电出版社,2000
    [30] 刘润东,UML对象设计与编程,北京希望电子出版社,2001
    [31] 袁德利,刘志远,面向对象的软件测试过程与方法,公安大学学报,2001
    [32] 叶仁如,郑玉墙,李玉珍,基于UML规格说明测试用例生成工具,计算机工程,2001
    [33] [美]Robert V.Binder著,华庆一,王斌群,陈莉等译,面向对象系统的测试,人民邮电出版社,2001
    [34] Regnell B.et al. Towards Integration of Use Case Modeling and Usage-based Testing. The Journal of System and software, 2000
    [35] 凌辉,李茜,许晓春,徐永森,徐永福。从用例模型到基于使用测试模型的转化,计算机科学,2001
    [36] 李留英,王戟,齐治昌。UML state charts的测试用例生成方法,计算机研究与发展,2001
    [37] 张楣,刘超,孙昌爱,基于UML活动图模型的测试用例生成技术研究,北京航空航天大学学报,2001
    [38] 范玉顺,复杂系统的面向对象建模、分析与设计。清华大学出版社,施普林格出版社,2000
    [39] 董威,王戟,郑延平,齐昌志,UML状态机的模型校验方法,计算机工程与科学,2001
    [40] Houman Younessi著,面向对象的软件缺陷管理,赵文耘,沈铖等译,机械工业出版社,2004.1
    [41] Paul C.Jorgensen著,软件测试,韩柯、杜旭涛译,机械工业出版社,2003.7
    [42] John D.McGregor David A, Sykes著,面向对象的软件测试,杨文宏、李新辉、杨洁等译,机械工业出版社,中信出版社,2003

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

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

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