Contract-based testing for web services

被引:0
|
作者
Dai, Guilan [1 ]
Bai, Xiaoying [2 ]
Wang, Yongbo [2 ]
Dai, Fengjun [1 ]
机构
[1] Tsinghua Univ, Res Inst Informat Technol, Beijing, Peoples R China
[2] Tsinghua Univ, Dept Comp Sci & Technol, Beijing, Peoples R China
基金
北京市自然科学基金; 美国国家科学基金会;
关键词
D O I
暂无
中图分类号
TP [自动化技术、计算机技术];
学科分类号
0812 ;
摘要
Service-oriented architectures introduce some important issues that need to be considered when performing software testing. In a service-oriented scenario, users just invoke a service, instead of physically integrating it (as it happens for components). The service provider can decide to maintain the service, and the user could not be aware of that. The dynamically constructed service-based system has to be tested dynamically and automatically at runtime without human intervention. This paper examines the use of Design by Contract for web service descriptions, and explores the issues and solutions Of automatic test case generation and test oracle generation in the context of WS testing based on contracts. In our approach, the traditional concept of contracts (pre-condition, post-condition, and invariant) is extended to contain richer information, such as process control, to support automatic test generation. Contracts are used to specify the relation between a component and its clients as a formal agreement, expressing each party's rights and obligations. Contracts can be expressed in the OWL-S process model. By checking whether the web service respects its contracts, we can ascertain its validity. Therefore, contracts provide the basis for the automation of the testing process. Test case generation includes test data generation and test process generation. Valid test data are generated for all WS behaviors using the complete WS input and precondition. The control constructs of contracts are transformed to Petri-Net model, and then generated test process based on the Petri-Net behavior analysis. A test oracle provides a means for determining whether an implementation functions according to its specification. Using the output and effect of the contract of a web service and corresponding test cases, it can automatically derive the expected state for every Perform in the test case. The actual state of an executing web service in terms Of Perform and their properties can be monitored and collected. Using the actual state acquired from an execution monitor, it can automatically compares the expected and actual states after each Perform to verify the correctness of the web service for the test case.
引用
收藏
页码:517 / +
页数:3
相关论文
共 50 条
  • [1] Towards Contract-based Testing of Web Services
    Heckel, Reiko
    Lohmann, Marc
    ELECTRONIC NOTES IN THEORETICAL COMPUTER SCIENCE, 2005, 116 : 145 - 156
  • [2] Contract-Based Discovery and Adaptation of Web Services
    Padovani, Luca
    FORMAL METHODS FOR WEB SERVICES, 2009, 5569 : 213 - 260
  • [3] Contract-Based Discovery and Composition of Web Services
    Bravetti, Mario
    Zavattaro, Gianluigi
    FORMAL METHODS FOR WEB SERVICES, 2009, 5569 : 261 - 295
  • [4] Contract-based testing
    Aichernig, BK
    FORMAL METHODS AT THE CROSSROADS: FROM PANACEA TO FOUNDATIONAL SUPPORT, 2003, 2757 : 34 - 48
  • [6] Design of a Contract-Based Web Services QoS Management System
    Yeom, Gwyduk
    Tsai, Wei-Tek
    Bai, Xiaoying
    Min, Dugki
    ICDCS: 2009 INTERNATIONAL CONFERENCE ON DISTRIBUTED COMPUTING SYSTEMS WORKSHOPS, 2009, : 306 - +
  • [7] A framework for contract-based collaborative verification and validation of web services
    Bai, Xiaoying
    Wang, Yongbo
    Dai, Guilan
    Tsai, Wei-Tek
    Chen, Yinong
    COMPONENT-BASED SOFTWARE ENGINEERING, PROCEEDINGS, 2007, 4608 : 258 - +
  • [8] Contract-based testing for PHP with Praspel
    Dadeau, Frederic
    Giorgetti, Alain
    Bouquet, Fabrice
    Enderlin, Ivan
    JOURNAL OF SYSTEMS AND SOFTWARE, 2018, 136 : 209 - 222
  • [9] Contract-based mutation for testing components
    Jiang, Y
    Hou, SS
    Shan, JH
    Zhang, L
    Xie, B
    ICSM 2005: PROCEEDINGS OF THE 21ST IEEE INTERNATIONAL CONFERENCE ON SOFTWARE MAINTENANCE, 2005, : 483 - 492
  • [10] A contract-based approach for monitoring collaborative Web services using commitments in the event calculus
    Rouached, M
    Perrin, O
    Godart, C
    WEB INFORMATION SYSTEMS ENGINEERING - WISE 2005, 2005, 3806 : 426 - 434