Testing Web Services by XML Perturbation Joint research with Wuzhi Xu and Juan Luo Jeff Offutt Information & Software Engineering George Mason University.

Slides:



Advertisements
Similar presentations
Introduction to Web Services Protocols. Talk titledate2 Communication and standards Efficient (or indeed any) communication is dependent on a shared vocabulary.
Advertisements

Overview Environment for Internet database connectivity
31242/32549 Advanced Internet Programming Advanced Java Programming
Web Service Ahmed Gamal Ahmed Nile University Bioinformatics Group
General introduction to Web services and an implementation example
XML and Enterprise Computing. What is XML? Stands for “Extensible Markup Language” –similar to SGML and HTML –document “tags” are used to define content.
Web Services Nasrullah. Motivation about web service There are number of programms over the internet that need to communicate with other programms over.
Introduction to Software Testing Chapter 5.5 Input Space Grammars Paul Ammann & Jeff Offutt
Introduction to Software Testing Chapter 9.5 Input Space Grammars Paul Ammann & Jeff Offutt
1 Introduction to XML. XML eXtensible implies that users define tag content Markup implies it is a coded document Language implies it is a metalanguage.
G O B E Y O N D C O N V E N T I O N WORF: Developing DB2 UDB based Web Services on a Websphere Application Server Kris Van Thillo, ABIS Training & Consulting.
Web Services Andrea Miller Ryan Armstrong Alex. Web services are an emerging technology that offer a solution for providing a common collaborative architecture.
Summary. Chapter 9 – Triggers Integrity constraints Enforcing IC with different techniques –Keys –Foreign keys –Attribute-based constraints –Schema-based.
Peoplesoft: Building and Consuming Web Services
Client/Server Architecture
Aug. 2, 2005Vasileios Papadimitriou1 Automating Bypass Testing for Web Applications Vasileios Papadimitriou The Volgenau School of Information.
Professional Informatics & Quality Assurance Software Lifecycle Manager „Tools that are more a help than a hindrance”
Web Application Architecture: multi-tier (2-tier, 3-tier) & mvc
INTRODUCTION TO WEB DATABASE PROGRAMMING
Chapter 9 Web Services Architecture and XML. Objectives By study in the chapter, you will be able to: Describe what is the goal of the Web services architecture.
Introduction to Software Testing Chapter 5.5 Input Space Grammars Paul Ammann & Jeff Offutt
Testing Dynamic Aspects of Web Applications Jeff Offutt Professor, Software Engineering George Mason University Fairfax, VA USA
XML-based Testing of Web Software Services Joint research with Wuxhi Xu, Juan Luo and Suet Chun Lee Jeff Offutt Software Engineering George Mason University.
©Ian Sommerville 2006Software Engineering, 8th edition. Chapter 12 Slide 1 Distributed Systems Architectures.
Adapting Legacy Computational Software for XMSF 1 © 2003 White & Pullen, GMU03F-SIW-112 Adapting Legacy Computational Software for XMSF Elizabeth L. White.
T Network Application Frameworks and XML Web Services and WSDL Sasu Tarkoma Based on slides by Pekka Nikander.
Quality Attributes of Web Software Applications – Jeff Offutt By Julia Erdman SE 510 October 8, 2003.
Module 14: WCF Send Adapters. Overview Lesson 1: Introduction to WCF Send Adapters Lesson 2: Consuming a Web Service Lesson 3: Consuming Services from.
James Holladay, Mario Sweeney, Vu Tran. Web Services Presentation Web Services Theory James Holladay Tools – Visual Studio Vu Tran Tools – Net Beans Mario.
1 Technologies for distributed systems Andrew Jones School of Computer Science Cardiff University.
Web Services (SOAP, WSDL, UDDI) SNU OOPSLA Lab. October 2005.
Chapter 27 The World Wide Web and XML. Copyright © 2004 Pearson Addison-Wesley. All rights reserved.27-2 Topics in this Chapter The Web and the Internet.
RELATIONAL FAULT TOLERANT INTERFACE TO HETEROGENEOUS DISTRIBUTED DATABASES Prof. Osama Abulnaja Afraa Khalifah
XRules An XML Business Rules Language Introduction Copyright © Waleed Abdulla All rights reserved. August 2004.
MobileMAN Internal meetingHelsinki, June 8 th 2004 NETikos activity in MobileMAN project Veronica Vanni NETikos S.p.A.
Course Schedule Report Web Service Carolyn Cracraft Lisa de Larios-Heiman.
 Repository Model  Client-Server Model  Layered Model  Modular decomposition styles  Object Models  Function Oriented Pipelining  Control Styles.
Chapter 10 Intro to SOAP and WSDL. Objectives By study in the chapter, you will be able to: Describe what is SOAP Exam the rules for creating a SOAP document.
Copyright © 2013 Curt Hill SOAP Protocol for exchanging data and Enabling Web Services.
Chapter 27 The World Wide Web and XML. Copyright © 2004 Pearson Addison-Wesley. All rights reserved.27-2 Topics in this Chapter The Web and the Internet.
1 Web Services Web and Database Management System.
Introduction to Software Testing Paul Ammann & Jeff Offutt Updated 24-August 2010.
Department of Industrial Engineering Sharif University of Technology Session# 10.
12 Chapter 12: Advanced Topics in Object-Oriented Design Systems Analysis and Design in a Changing World, 3 rd Edition.
An Introduction to Web Services Web Services using Java / Session 1 / 2 of 21 Objectives Discuss distributed computing Explain web services and their.
David Orchard W3C Lead BEA Systems Web service and XML Extensibility and Versioning.
Representational State Transfer (REST). What is REST? Network Architectural style Overview: –Resources are defined and addressed –Transmits domain-specific.
WSDL – Web Service Definition Language  WSDL is used to describe, locate and define Web services.  A web service is described by: message format simple.
A Demonstration of Collaborative Web Services and Peer-to-Peer Grids Minjun Wang Department of Electrical Engineering and Computer Science Syracuse University,
Chapter 5 Introduction To Form Builder. Lesson A Objectives  Display Forms Builder forms in a Web browser  Use a data block form to view, insert, update,
REST By: Vishwanath Vineet.
Introduction to Web Services Presented by Sarath Chandra Dorbala.
Web Service Definition Language. Web Services: WSDL2 Web Service Definition Language ( WSDL ) What is a web service? [ F. Leymann 2003 ] A piece of code.
Copyright 2007, Information Builders. Slide 1 iWay Web Services and WebFOCUS Consumption Michael Florkowski Information Builders.
Web Services Blake Schernekau March 27 th, Learning Objectives Understand Web Services Understand Web Services Figure out SOAP and what it is used.
Web Services. XML Namespaces, Schemas XML processing. Week 2.
CS223: Software Engineering Lecture 19: Unit Testing.
Architectural Mismatch: Why reuse is so hard? Garlan, Allen, Ockerbloom; 1994.
DEVELOPING WEB SERVICES WITH JAVA DESIGN WEB SERVICE ENDPOINT.
Interstage BPM v11.2 1Copyright © 2010 FUJITSU LIMITED INTEGRATION.
Software Architecture Patterns (3) Service Oriented & Web Oriented Architecture source: microsoft.
XML 1. Chapter 8 © 2013 Pearson Education, Inc. Publishing as Prentice Hall SAMPLE XML SCHEMA (XSD) 2 Schema is a record definition, analogous to the.
Java Web Services Orca Knowledge Center – Web Service key concepts.
SOFTWARE DESIGN AND ARCHITECTURE
Implementing a service-oriented architecture using SOAP
CSSSPEC6 SOFTWARE DEVELOPMENT WITH QUALITY ASSURANCE
Paul Ammann & Jeff Offutt
Introduction of Week 11 Return assignment 9-1 Collect assignment 10-1
Presentation transcript:

Testing Web Services by XML Perturbation Joint research with Wuzhi Xu and Juan Luo Jeff Offutt Information & Software Engineering George Mason University Fairfax, VA USA Partially supported by NASA, Avaya Research Labs and NIST

© Jeff Offutt, Web Services A Web Service is a program that offers services over the Internet to other software programs –Internet-based –Uses SOAP and XML –Peer-to-peer communication Web service components can integrate dynamically, by finding other services during execution Web services transmit data that are formatted in XML

© Jeff Offutt, Web Service Architecture Web Services server Laptop PDA Work- station Cell phone Web-based internet servers clients Client-server server clients

© Jeff Offutt, Web Service Technologies WSDL Specification Specification Components Legacy System Wrapped Specification UDDI Registry Services Wrapped Applications SOAP / XML Points to URL SOAP / XML Publish Find Bind

© Jeff Offutt, XML Software components that pass data must agree on format, types, and organization Web services have unique requirements : –Very loose coupling and dynamic integration 1970s style P1P2 File File storage Un-documented format Data saved in binary mode Source not available 1980s style P1P2 File WM File storage Un-documented format Data saved as plain text Access through wrapper module Data hard to validate

© Jeff Offutt, XML Data is passed directly between components XML allows for self-documenting data 1980s style DTD P1 P2 Parser XML File P3 P1, P2 and P3 can see the format, contents, and structure of the data Data sharing is independent of type Format is easy to understand Grammars are defined in DTDs or Schemas

© Jeff Offutt, Testing Web Services 1.This research tests web services by focusing on interactions among the components 2.A formal model of the XML grammar is created 3.Previous research generated valid tests directly from the grammar ( TAVWEB 2004 [20] ) 4.This research focuses on invalid tests 5.The grammar is mutated, or perturbed 6.The perturbed grammar is used to generate new mutated XML messages 7.The mutated messages are used as test cases

© Jeff Offutt, XML Data Model An XML schema can be modeled as a tree T = (N, D, X, E, n r ) N is a finite set of elements and attribute nodes D is a finite set of built-in and derived data types X is a finite set of constraints E is a finite set of edges Edges are from N to N  D, plus a constraint n r is the root node

© Jeff Offutt, XML Data Model Example

© Jeff Offutt, XML Data Model

© Jeff Offutt, Perturbing Schemas This part of our project focuses on perturbing schemas to create invalid data –Results creating valid data in another paper Systematic perturbation of elements in tree model –Nodes (excluding the root node) –Datatypes –Edges Perturbation operators modify schema trees to create mutated schemas

© Jeff Offutt, Perturbation Operators Insert new node Delete node Insert a new node that connects a datatype Delete a node and its dataype Insert a new subtree Delete a subtree Change constraints on a node These operators are designed to mimic common XML errors

© Jeff Offutt, Test Criteria Delete Coverage (DC) –Delete each node, edge, subtree Insert Coverage (IC) –After deleting, insert new nodes, edges, subtrees Constraint Coverage (CC) –Uses change constraints operator and rules about XML “facets” to modify all constraints

© Jeff Offutt, XML Constraints – “Facets” Boundary Constraints Non-boundary Constraints maxOccursenumeration minOccursuse lengthfractionDigits maxExclusivepattern maxInclusivenillable maxLengthwhiteSpace minExclusiveunique minInclusive minLength totalDigits

© Jeff Offutt, Test Case Generation A test case is an XML message Tests are generated directly from mutated schemas Constraints are “violated” systematically –Values beyond the boundary values “maxLength=5”  “abcdef” –Values outside the non-boundary constraints “fractionDigits=2”  “ ” Multiple XML messages from the same schema Messages are invalid, so a valid response is an error –False positives : Messages that are accidentally valid

© Jeff Offutt, Test Case Generation – Example Original Schema (Partial) Mutants : value = “3” value = “1” Mutants : value = “100” value = “2000” XML from Original Schema Mutant XML Mutant XML Mutant XML Mutant XML

© Jeff Offutt, Case Study 1 Small Web service created at GMU –Three components: Mars robot, Space station, ground control –Ground control is a three-tier web application Correct behavior is to have abnormal responses –Receiver cannot process the data, responds with a fault –Receiver has a runtime exception Results: DCICCCOriginalTotal XML Schemas XML Messages Abnormal Response Normal Response Only CC tests got normal responses

© Jeff Offutt, Case Study 2 From Web Services Interoperability Organization –Supply chain management –Seven XML schema –Three were requests and used for perturbation-based tests Mutated Schemas SchemaDCICCC Retailer14839 Warehouse6223 Manufacturer8323 XML Messages DCICCC Twenty-two faults inserted into the program Seven faults found – all by CC tests

© Jeff Offutt, Analysis of Faults 14 faults not found 6 faults : Could not be found by external inputs –Unit testing 5 faults : Affected back-end log file –Observability … log-file was not seen 1 fault : Depends on inputs from the database –Controllability … tests depend on XML, not DB 2 faults : Required specific values that were not used All DC and IC tests were detected by program

© Jeff Offutt, Current and Future Work Improve invalid test generation –Focus on constraint tests –Expand mutation of constraints Automatic test generation Merge valid and invalid tests General problems –Dealing with observability –Dealing with controllability