用户名: 密码: 验证码:
基于UML2.0动态视图的Web服务模型测试方法及其应用
详细信息    本馆镜像全文|  推荐本文 |  |   获取CNKI官网全文
摘要
如何保证并不断提高软件质量是软件工程研究的一个核心问题。软件测试能够有效地发现软件中隐藏的缺陷,是保证软件质量的重要方法。Web服务是分布式计算领域的新兴技术,具有良好的开放性、高度可集成性等优点;UML2.0已经成为事实上的建模语言标准,基于UML2.0构建软件测试模型,能够清楚并完整地描述被测试系统的真实信息,便于测试人员的理解和测试工作的尽早展开。
    
     为了提高Web服务的可靠性,本文提出了基于UML2.0活动图和通信图构建Web服务测试模型,在得到的测试模型基础上进行Web服务测试的方法。本文的主要思想是将Web服务业务流程以及Web服务对象交互转化为可视化的动态测试模型。该方法扩展了UML2.0活动图,使其能够描述BPEL的语法元素和行为特性;同时,给出UML2.0活动图形式化定义及其测试覆盖准则,对测试用例生成的深度优先搜索算法加以约束,合理地减少了测试用例的数量,提高了测试的效率和精确性;利用UML2.0通信图的优点描述Web服务对象的交互过程,通过将UML2.0通信图转化为通信树,对通信树中的断言进行选择转换,结合所定义的UML2.0通信图测试覆盖准则,使用求解函数最小值的方法生成测试用例。本文通过一个基于Web服务技术的订票售票系统实例来说明本文研究内容的可行性。
     本文的研究是将基于模型的软件测试技术应用到提高Web服务可靠性的一个尝试。通过基于UML2.0动态视图构建Web服务测试模型,并结合形式化方法和测试覆盖准则,本文的研究可以降低Web服务测试成本,提高Web服务测试效率和自动化程度,对UML2.0在Web服务测试中的应用起到一定的推动作用。
The assurance and improvement of Software Quality is a key question of the Software Engineering. As an important way of Software Quality Assurance, Software Testing can find out hidden bugs in the software system effectively. Web Services is a new technology of distributed computing area, which is excellent openness and high degree of integration. UML2.0 is the de facto modeling language standard. The testing model based on UML2.0 can reflect the true information of the tested system distinctly and entirely, which can be comprehended easily by the software tester. At the same time, the test work can start as early as possible.
     In order to improve the reliability of Web Services, a Web Services testing model and testing approach based on UML2.0 activity diagram and UML2.0 communication diagram is presented. The key idea of the approach is to transform the Web Services business process and objects interaction to visual dynamic testing model. The approach extends UML2.0 activity diagram to describe the syntax and behaviors of BPEL. The formal specification and the definition of test coverage criteria of UML2.0 activity diagram are proposed. It enhances the restriction of test cases generation method and promotes the efficiency and accuracy of testing by reducing the amount of test cases reasonably. The approach describes the objects interaction process of Web Services with UML2.0 communication diagram. By constructing a communication tree according to the UML2.0 communication diagram, the approach selects and transforms the predicates. With the definition of UML2.0 communication diagram test coverage criteria, the test cases can be generated using function minimization method. To illustrate this more thoroughly, this paper discusses the feasibility of the research with an example of a booking system based on Web Services technology.
     The research of this paper attempts to improve the reliability of Web Services with the model-based testing technology. With Web Services testing model based on UML2.0 dynamic view, the research of this paper can not only reduce the testing cost, but also improve the efficiency and automation of testing using formal method and test coverage criteria. This promotes to use UML2.0 for Web Services testing.
引文
[1]. 郑人杰.软件测试、质量与可靠性.北京:国防工业出版社,1994.
    [2]. Giuseppe A, Di Lucca, Anna Rita Fasolino. Testing Web-based applications: The state of the art and future trends. Information and Software Technology, 2006, 48(12): 1172~1186.
    [3]. 单锦辉, 姜 瑛, 孙 萍. 软件测试研究进展.北京大学学报(自然科学版), 2005, 41(1):134~145.
    [4]. Bangio A, Ceri S, Franternali P. Web Model Language (WebML): A Modeling Language for Designing Web Sites. Proceeding of the 9th International Conference on the WWW. Amsterdam: Computer Networks, 2000. 137~157.
    [5]. Liu C, Kung D C, Hsia C, et al. Object-based Data Flow Testing of Web Application. Proceedings of the 1st Asia-Pacific Conference on Quality Software. Hong Kong: IEEE Computer Society Press, 2000. 7~16.
    [6]. Ricca F, Tonella P. Analysis and Testing of Web Application. Proceedings of the 23rd International Conference on Software Engineering. Washington: IEEE Computer Society Press, 2001. 25~34.
    [7]. Ricca F, Tonella P. A 2-layer Model for the White-box Testing of Web Applications. Proceedings of the 6th IEEE Workshop on Web Site Evolution. Chicago: IEEE Computer Society Press, 2004. 11~19.
    [8]. Andrews A A, Offutt J, Alexander R T. Testing Web Applications by Modeling with FSMs. Software Systems and Modeling. Springer-Verlag, 2005, 4(2): 326~345.
    [9]. Di Lucca G A, Fasolino A R, Tramontana P. Reverse Engineering Web Applications: the WARE Approach. Journal of Software Maintenance and Evolution, 2004, 16(1): 71~101.
    [10]. Xu Lei, Xu Baowen. Testing Web Application Focusing on Their Specialties. ACM Software Engineering Notes (SEN), 2005, 30(1): 10~16.
    [11]. 路晓丽, 葛 玮, 郝克刚. Web 应用软件测试模型的研究和构建. 计算机科学, 2006, 33(1):175~177.
    [12]. 姜 瑛, 辛国茂, 单锦辉, 等. 一种 Web 服务的测试数据自动生成方法. 计算机学报, 2005, 28(4): 568~577.
    [13]. 李 诺, 吴 际, 金茂忠, 等. Web 应用测试模型研究. 电子学报, 2005, 33(12): 2376~2380.
    [14]. Wu Ye, Chen Mei Hwa, Offutt Jeff. UML-based Integration Testing for Component-based Software. Proceedings of the 2nd International Conference on COTS-Based Software Systems. Ottawa: Springer-Verlag, 2003, LNCS2580, 251~260.
    [15]. Liu W, Dasiewicz P. Component Interaction Testing Using Model Checking. Proceedings of the IEEE Canadian Conference on Electrical and Computer Engineering. Toronto: IEEE Computer Society Press, 2001. 41~46.
    [16]. Zhang Jia. An approach to Facilitate Reliability Testing of Web Services Components. Proceedings of the 15th International Symposium on Software Reliability Engineering. Saint-Malo: IEEE Computer Society Press, 2004. 210~218.
    [17]. Hu H, Wong W E, Jiang C H, et al. A Case Study of the Recursive Least Square Estimation Approach to Adaptive Testing for Software Components. Proceedings of the 5th International Conference on Quality Software. Melbourne: IEEE Computer Society Press, 2005. 135~141.
    [18]. 赖祥伟, 张为群, 邱玉辉, 等. 形式化的软件测试模型研究. 计算机科学, 2004, 31 (11): 169~173.
    [19]. 兰毓华, 毛法尧, 曹化工. 基于 Z 规格说明的软件测试用例自动生成. 计算机学报,1999, 22(9): 963~969.
    [20]. 虞 凡, 覃 征, 贾晓琳, 等. 基于 XYZ/E 规范的软件测试用例自动生成方法. 计算机工程. 2005, 31 (19): 76~78.
    [21]. 聂长海, 徐宝文. 一种最小测试用例集生成方法. 计算机学报, 2003, 26(12): 1690~1695.
    [22]. 史 亮, 聂长海, 徐宝文. 基于解空间树的组合测试数据生成. 计算机学报, 2006, 29(6): 849~857.
    [23]. 岳 昆, 王晓玲, 周傲英. Web 服务核心支撑技术: 研究综述. 软件学报, 2004, 15(3): 428~442.
    [24]. 黄 宁, 余 莹, 张大勇. Web 服务软件测试技术的研究与实现. 计算机工程与应用, 2004,40(35): 147~149.
    [25]. 白晓颖, 赵冲冲, 戴桂兰. Web 服务测试研究. 计算机科学, 2006, 33(2): 252-256.
    [26]. 郭 勇, 邓 波, 衣双辉. 面向服务的网格软件测试环境. 软件学报, 2006, 17(11): 2335~2340.
    [27]. 王林章, 李宣东, 郑国粱. 模型驱动的软件测试研究. 计算机科学, 2005, 32(10):230~235.
    [28]. Sommerville I, Sawyer P. Requirements Engineering: A Good Practice. Chichester UK: Wiley, 1999.
    [29]. Binder R. Testing Object-oriented Software: A Survey. Journal of Software Testing, Verification and Reliability, 1996, 6(3):125~252.
    [30]. Maurer P.M. The Design and Implementation of a Grammar-based Data Generator. Software Practice and Experience, 1992, 23(3):223~244.
    [31]. Offutt J, Abdurazik A. Generating Test Cases from UML Specifications. UML’99[C], Berlin: Springer-Verlag, 1999, 416~429.
    [32]. Hong H S, Kim Y G, Cha S D.A Test Sequence Selection Method for Statecharts. The Journal of Software Testing Verification & Reliability, 2000, 10(4): 203~227.
    [33]. 张 涌, 钱乐秋, 王渊峰. 基于扩展有限状态机测试中测试输入数据自动选取的研究. 计算机学报, 2003, 26(10): 1295~1303.
    [34]. 王之梁, 吴建平, 尹 霞. 基于通信多端口有限状态机的协议互操作性测试生成研究. 计算机学报, 2006, 29(11): 1909~1919.
    [35]. Cai K Y, Li Y C, Ning W Y. Optimal Software Testing in the Setting of Controlled Markov Chains. European Journal of Operational Research, 2005, 162(2): 552~579.
    [36]. Srini Narayanan, Sheila A Mcllraith. Simulation, Verification and Automated Composition of Web Services. Proceedings of the 11th International Conference on World Wide Web. Hawaii: ACM, 2002. 77~88.
    [37]. Shin Nakajima. Model-checking Verification for Reliable Web Services. Proceedings of the 2002 ACM SIGPLAN Conference on Object-Oriented Programming Systems, Languages and Applications. Washington: ACM, 2002. 46~57.
    [38]. Foster Howard, Uchitel Sebastian, Magee Jeff, et al. Model-based Verification of WebServices Compositions. Proceedings of the 18th IEEE International Conference on Automated Software Engineering. Quebec: IEEE Computer Society Press, 2003. 152~161.
    [39]. Yi X, Kochut K J. A CP-nets-based Design and Verification Framework for Web Services Composition. Proceedings of IEEE International Conference on Web Services. San Diego: IEEE Computer Society Press, 2004. 756~760.
    [40]. 李留英, 王 戟, 齐治昌. UML Statechart 的测试用例生成方法. 计算机研究与发展. 2001, 38(6): 691~697.
    [41]. Offutt J, Abdurazik A. Generating Test Cases from UML Specifications. Proceedings of the 2od International Conference on the Unified Modeling Language, Colorado: Springer-Verlag, 1999, 416~429.
    [42]. Supaporn K, Wanchai R. Automated-Generating Test Case Using UML Statechart Diagrams. Proceedings of the South African Institute of Computer Scientists and Information Technologists, Pretoria: Springer-Verlag, 2003, 296~300.
    [43]. 刘 敏,金茂忠,刘 超.基于 UML 活动图模型生成测试场景的设计.计算机工程与应用,2002,12:122~124.
    [44]. Andreas R, Sacha R, Erik K, Klaus P. Derivation of Domain Test Scenarios from Activity Diagrams. ACM SIGSOFT Software Engineering Notes, 2004, 29(2): 12~18.
    [45]. Falk F, Thomas L. SeDiTeC-Testing Based on Sequence Diagrams. Proceedings of the 17th IEEE International Conference on Automated Software Engineering. Edinburgh: IEEE Computer Society Press, 2002, 261~267.
    [46]. 江泽凡, 王林章, 李宣东, 郑国梁.基于 UML 顺序图的测试方法. 计算机科学, 2004, 31(7):131~136.
    [47]. Rountev A, Kagan S, Sawin J. Coverage Criteria for Testing of Object Interactions in Sequence Diagrams. Proceedings of the 8th International Conference on Fundamental Approaches to Software Engineering .Edinburgh: Springer-Verlag, 2005, 234~248.
    [48]. 王林章, 李宣东, 郑国梁 . 一个基于 UML 协作图的集成测试用例生成方法. 电子学报, 2004, 32(8):1290~1296.
    [49]. Bertolino A, Marchetti E. Introducing A Reasonably Complete and Coherent Approach for Model-based Testing. Theoretical Computer Science, 2005, 116(1):85~97.
    [50]. 李力峰. 基于 UML 动态视图的测试模型及应用. 苏州大学硕士学位论文. 2006.
    [51]. 李留英. UML 测试技术的研究与实现. 国防科学技术大学博士学位论文. 2000.
    [52]. 顾 宁, 刘家茂, 柴晓路. Web Services 原理与研发实践. 北京:机械工业出版社, 2006.

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

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

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