节点文献

基于有限状态机的Web服务测试用例生成方法

A Method of Test Case Genernation for Web Services Based on Finite State Machine

【作者】 王任

【导师】 黎升洪;

【作者基本信息】 江西财经大学 , 计算机软件与理论, 2009, 硕士

【摘要】 随着信息技术的发展,软件规模的不断扩大,如何保证和提高软件质量成为软件界最为关心的问题之一。近年来,Web服务的松散藕合性、简单性、高度可集成性、规范性、开放性和行业支持等特点使其得到了迅猛的发展,Web服务的出现解决了语言差异、平台差异、协议差异、数据差异所带来的高代价的系统集成问题,显著降低了开发的代价,但Web服务的可靠质量是服务选择、应用和集成的关键依据之一,因此,确保Web服务的质量成了一个至关重要的问题。软件测试作为保证软件质量的关键技术之一,能够有效地发现软件中的故障。软件测试的核心问题是测试用例的产生。好的测试用例不仅能有效的发现软件中的缺陷,并可以减少软件测试的工作量。测试用例的生成将直接关系到Web服务测试的效率和成本。随着面向服务软件开发技术的广泛应用和软件测试自动化的要求,基于模型的软件测试逐渐得到重视。在几种有代表性的基于模型的软件测试中,基于有限状态机的测试模型已经成为软件测试研究领域的一个热点。它能够很好地反映被测试系统中动态行为的交互信息,容易被开发和测试人员理解,并且它的使用可降低软件测试成本,提高软件测试效率和自动化程度,改进了传统测试方法技术中的很多不足。为了提高Web服务的可靠性,本文利用有限状态机模型来构建Web服务测试模型,并在得到的测试模型基础上生成Web服务的测试用例。本文的主要思想是用有限状态机模型来描述Web服务对象行为以及Web服务对象之间的交互特性,以便生成Web服务的测试用例。本文在结合Web服务和有限状态机特点的基础上,为了能构建基于有限状态机的Web服务测试模型,文中用有限状态机模型的状态来描述Web服务交互产生的中间状态,并且有限状态机模型的状态迁移及其标注描述Web服务与用户间的消息交换,然后,借助正则表达式来描述Web服务交互过程的所有消息交换序列。正则表达式结合Web服务的WSDL文档可生成测试数据。为使得Web服务测试用例能自动生成,本文还给出了满足有限状态机模型测试覆盖准则的用例生成算法。本文以股票交易服务(Trading Stocks)为例,通过实验验证了该方法的有效性。通过基于有限状态机模型构建Web服务测试模型,并结合形式化方法和测试覆盖准则,本文的研究可以降低Web服务测试成本,提高Web服务测试效率和自动化程度,为有限状态机模型在Web服务测试中应用起到一定的推动作用。

【Abstract】 It is a concerning issue of improving and verifying the quality of software with the process of IT and the scale of software. Recently, Web Services have been developed rapidly because of its properties, such as, loosely coupling, simplicity, high compositionality, based standard, opening and industry supporting. Web Services reduces the developing cost because it bridges the gaps of language difference, platform difference, protocol difference and data difference while a system is integrated. But, the reliable quality of the Web Services is one of the key factors for services selection, application and integration, it is important to insure the Web Services quality. Software testing is one of the key technologies that ensure the quality of software. It can find software failures effectively. The core problem is test cases generation in software testing. A good test case not only can effectively find software defects, but also can reduce the workload of software testing. The test cases will be directly related to the efficiency and cost of the Web Service test. With the service-oriented software development technology widely applications and software test automation requirements, model-based software testing is paid attention gradually. Specially, the testing model based on finite state machine has become a hot research field. It can deeply describe the dynamic interactions of information, which are easily understood by the development and testing staff, so it reduces the software testing costs, enhances the efficiency and automation degree of software testing and improves many disadvantages of the traditional testing methods.This thesis presents a Web Services testing model based on Finite State Machine Model (FSM) in order to improve the reliability of Web Services and testing cases can be generated by the model. The main idea is using FSM to describe the Web Services object behaviors and objects interactions in order to generate the Web Services test case. In order to build the Web Services testing model, this paper depicts the middle states of interactions, which are described by the FSM’s nodes, between Web Services and users by means of abstraction the characteristics of Web services and FSM. The FSM’s transitions are expressed by exchanged messages during the interactions. Furthermore, the sequences of exchanged messages of the interaction can be depicted by regular expressions so that testing case can be produced with WSDL description. The algorithm of testing case generation meeting the coverage criteria is presented to enable Web services to generate test cases automatically. The method and algorithm are exemplified by a stock trading service. By means of FSM-based model to build Web service testing model and mixture of formal methods and test coverage criteria, this research can reduce the Web service testing costs, raise the efficiency and automation of Web service testing, it play a certain role to promoting the application of FSM in Web services testing.

节点文献中: 

本文链接的文献网络图示:

本文的引文网络