monadws: A Monad-Based Testing Tool for Web Services



Similar documents
Freight Tracking Web Service Implementation Guide

DEVELOPING CONTRACT - DRIVEN WEB SERVICES USING JDEVELOPER. The purpose of this tutorial is to develop a java web service using a top-down approach.

Web-Service Example. Service Oriented Architecture

Introduction. Tom Dinkelaker, Ericsson Guido Salvaneschi, Mira Mezini, TUD

Middleware and the Internet. Example: Shopping Service. What could be possible? Service Oriented Architecture

Creating Web Services in NetBeans

Middleware and the Internet

The presentation explains how to create and access the web services using the user interface. WebServices.ppt. Page 1 of 14

Implementeren van HL7v3 Web Services

REST vs. SOAP: Making the Right Architectural Decision

GetLibraryUserOrderList

Oracle Web Service Manager 11g Field level Encryption (in SOA, WLS) March, 2012

Introduction to Web Services, SOA, and ESBs

Service Oriented Computing: SOAP, WSDL and UDDI. Dr. Cristian Mateos Diaz ( ISISTAN - CONICET

Realizing Enterprise Integration Patterns in WebSphere

Using ilove SharePoint Web Services Workflow Action

How To Write A Wsdl Standard For Csta (Ecma) And Cst A) (Ecmma)

GetFormatList. Webservice name: GetFormatList. Adress:

Types of Cloud Computing

Replacements TECHNICAL REFERENCE. DTCCSOLUTIONS Dec Copyright 2009 Depository Trust Clearing Corporation. All Rights Reserved.

02267: Software Development of Web Services

BBM467 Data Intensive ApplicaAons

What is Distributed Annotation System?

Lesson 4 Web Service Interface Definition (Part I)

Lesson 18 Web Services and. Service Oriented Architectures

Grid Computing. Web Services. Explanation (2) Explanation. Grid Computing Fall 2006 Paul A. Farrell 9/12/2006

4.2 Understand Microsoft ASP.NET Web Application Development

Formal Methods for Software Development

Devices Profile for Web Services

BPEL. A Step by Step Guide: Model-Driven Generation with. Enterprise Architect. T his document will teach you how to use the Business Process

Service-centric Software Engineering. Ian Sommerville 2006 Software Engineering, 8th edition. Chapter 31 Slide 1

How To Write A Programmg With A State Monad And An Imperative Dsl

XML in Programming 2, Web services

02267: Software Development of Web Services

Introduction into Web Services (WS)

Author: Gennaro Frazzingaro Universidad Rey Juan Carlos campus de Mostòles (Madrid) GIA Grupo de Inteligencia Artificial

REST web services. Representational State Transfer Author: Nemanja Kojic

Concept, implementation and performance testing of a mobile Web Service provider for Smart Phones

Introduction to CASA: An Open Source Composite Application Editor

United Concordia (UCD) Real Time Claim Submission & Adjudication Connectivity Specifications

Web Services Strategy

Service-oriented Development of Federated ERP Systems

Web Services. Distributed Object Systems 11. Web Services, SOAP and NET. Web Applications. Web Services. Web services vs Distributed Objects

The following is intended to outline our general product direction. It is intended for information purposes only, and may not be incorporated into

SOA Best Practices (from monolithic to service-oriented)

"Understanding Devices Profile for Web Services, Web Services Discovery, and SOAPover-UDP"

Integration Knowledge Kit Developer Journal

The BritNed Explicit Auction Management System. Kingdom Web Services Interfaces

Blue Cross Blue Shield of Michigan

Creating SOAP and REST Services and Web Clients with Ensemble

Service-oriented architecture in e-commerce applications

Finding and Preventing Cross- Site Request Forgery. Tom Gallagher Security Test Lead, Microsoft

SOA Planning Guide The Value Enablement Group, LLC. All rights reserved.

OpenESB standalone edition Version 3.0 OpenESB set up in a multiple environments context. Application configurations and variables


Management and Web service Management

Library Intro AC800M

Building the European Biodiversity. Observation Network (EU BON)

Motivation Definitions EAI Architectures Elements Integration Technologies. Part I. EAI: Foundations, Concepts, and Architectures

Building Web Services with XML Service Utility Library (XSUL)

ASPIRE Programmable Language and Engine

Service Oriented Architecture using JAVA

Web Services Manageability Concepts (WS-Manageability)

Digital Signature Web Service Interface

Enabling REST Services with SAP PI. Michael Le Peter Ha

Ontology-based Web Service Composition: Part 1. Rolland Brunec Betreuerin: Sabine Maßmann Universität Leipzig, Abteilung Datenbanken

Modern XML applications

Connecting to WebSphere ESB and WebSphere Process Server

Connecting Custom Services to the YAWL Engine. Beta 7 Release

Formal Methods for Software Development

Using Web Services to Exchange data with Qualtrics and Hobsons Connect

Simplifying Processes Interoperability with a Service Oriented Architecture

Building SOA Applications with JAX-WS, JAX- RS, JAXB, and Ajax

WEB SERVICES OF MMS APPLICATIONS ON MOBILE DEVICES

How To Create A C++ Web Service

Secure Authentication and Session. State Management for Web Services

Server based signature service. Overview

Send your request via a SOAP-Request (e.g. with DotNET/SOAP, Java, PHP) to he following URL of our server:

Model Driven Interoperability through Semantic Annotations using SoaML and ODM

Web services with WebSphere Studio: Build and test

EAI OVERVIEW OF ENTERPRISE APPLICATION INTEGRATION CONCEPTS AND ARCHITECTURES. Enterprise Application Integration. Peter R. Egli INDIGOO.

Web Services Distributed Management: Management of Web Services (WSDM-MOWS) 1.1

NetBeans IDE Field Guide

Distributed Embedded Systems

JDeveloper 11g JAX-WS web services:

Mobility Information Series

Oracle SOA Reference Architecture

Transcription:

monadws: A Monad-Based Testing Tool for Web Services College of Computer, Nanjing University of Posts and Telecommunications, Nanjing 210003, China Yingzhou Zhang, Wei Fu, Changhai Nie Email: zhangyz@njupt.edu.cn

Agenda About monadws Monads Techniques The monads in monadws HSP monad Gen monad TestM monad Tool Snapshots Conclusion 2

About monadws An automatic WS testing tool based on monads techniques monadws adopts HSP monad [1] for describing WS test cases Gen monad [2] for generating test data automatically, and TestM monad for building the whole WS testing. [1] HSP (Haskell Server Pages): http://code.google.com/p/hsp/ [2] Claessen K, Hughes J. QuickCheck: k a lightweight i tool for random testing ti of Haskell programs. In Proceedings of the Fifth ACM SIGPLAN international Conference on Functional Programming, New York, 2005: 268~279.

WSDL Specification Its framework <porttype/> <types/> <binding/> <service/> Operations XML Schema SoapActions Services Data Generation Strategy URL addre ss Gen Monads <<Client >> <<Client >> SOAP Generator request soap test cases (XML files) HTTP wrap SOAP Caller expeted response soap response results HSP Monads QuickCheck Properties TestM Monads Test Reports

Agenda About monadws Monads Techniques The monads in monadws HSP monad Gen monad TestM monad Tool Snapshots Conclusion 5

Monads Intro. A general functional notation f : a -> b Its monadic version of this notion f: a -> M b Operations on monad M return :: a -> >Ma bind :: M a -> (a -> M b) -> M b Therefore, a monad can be thought as a strategy for combining computations into more complex computations. 2011-6-15

Agenda About monadws Monads Techniques The monads in monadws HSP monad Gen monad TestM monad Tool Snapshots Conclusion 7

HSP Monad: represent TC represents a WS test case as a SOAP message can encapsulate any side effects, and lets all XML expressions be computed safely maketc_serv :: InputType -> HSP XML The input type of a service operation (say serv), such as String, Double 8

HSP Monad: represent TC maketc_serv :: InputType -> HSP XML For example: maketc_getoffesetutctime :: Double -> HSP XML maketc_getoffesetutctime d = <soap:envelope p xmlns:soap=soapuri p xmlns:xsd=xsduri> <soap:body> <getoffesetutctime xmlns=operurl> <hoursoffset> <% show d %> </hoursoffset> </getoffesetutctime> </soap:body> </soap:envelope> where soapuri ="http://schemas.xmlsoap.org/soap/envelope/" xsduri = "http://www.w3.org/2001/xmlschema" operurl = "http://www.nanonull.com/timeservice/" / / 9

HSP Monad: represent TC maketc_getoffesetutctime :: Double -> HSP XML maketc_getoffesetutctime d = <soap:envelope xmlns:soap=soapuri xmlns:xsd=xsduri> <soap:body> <getoffesetutctime xmlns=operurl> <hoursoffset> <% show d %> </hoursoffset> </getoffesetutctime> </soap:body> </soap:envelope> where soapuri ="http://schemas.xmlsoap.org/soap/envelope/" xsduri = "http://www.w3.org/2001/xmlschema" operurl = "http://www.nanonull.com/timeservice/" HSP provides interfaces for other computations through the escapes (with <% and %> ) 10

Gen Monad: generate data automatically generates data for simple types (such as Double, Int, String and so on) class Arbitrary a where arbitrary :: Gen a instance Arbitrary String instance Arbitrary Double 11

Gen Monad: generate data class Arbitrary a where arbitrary :: Gen a maketc_getoffesetutctime :: Double -> HSP XML general testing method: Step 1. generate a test value Step 2. generate the final test case with the value testtcgen :: IO String testtcgen = do d <- generate (arbitrary :: Gen Double) return $ hsp2str (maketc_g getoffesetutctime d) 12

Gen Monad: generate data maketc_getoffesetutctime :: Double -> HSP XML general testing method: testtcgen :: IO String testtcgen = do d <- generate (arbitrary :: Gen Double) return $ hsp2str (maketc_getoffesetutctime d) monadic method by liftm : on-the-fly ygenerate testtcgen2 :: IO String testtcgen2 = liftm (hsp2str. maketc_getoffesetutctime) $ generate (arbitrary :: Gen Double) 13

Gen Monad: generate data We can easily change the generation strategy through the instances of Arbitrary class. class Arbitrary a where arbitrary :: Gen a instance Arbitrary Double where arbitrary = mydoublegen mydoublegen :: Gen Double mystringgen = suchthat arbitrary guard where guard a = (a > 0) && (a < 1000) elem a [-1, 0, 9999] 14

TestM Monad: testing ti as a monad processes WS testing as the following TestM monad: type TestM a = CoAlgMonadT (EnvT TestEnv (StateT TestState HSP )) a Coalgebraic monad for WS computing Environment monad for testing ti environment (eg. Schema type information, test cases files) State monad for testing states (eg. executing time, testing results) 15

CPU Time Results of Autogeneration Test Cases for TimeService Execution Time of the Execution Time of the SOAP Messages of getoffesetutctime in TimeService

Comparison of WSTester with Other Test Tools for Web Services

Agenda About monadws Monads Techniques The monads in monadws HSP monad Gen monad TestM monad Tool Snapshots Conclusion 18

Snapshots of our tool monadws

Snapshots of our tool monadws

Snapshots of our tool monadws

Agenda About monadws Monads Techniques The monads in monadws HSP monad Gen monad TestM monad Tool Snapshots Conclusion 22

Conclusion bifl briefly introduce our monad-based d testingti tool, monadws To automatically test web services. monadws can use monadsrelated d to hl help WS test case representation, test data autogeneration, and test auto-execution. 23

Conclusion monadws can use monadsrelated d to hl help WS test case representation, test data autogeneration, and test auto-execution. Future work More comparisons with existing tools Use more data-generation strategy Apply to WS composition (with BPEL) 24