Automated Testing and Response Analysis of Web Services

Slides:



Advertisements
Similar presentations
18 Copyright © 2005, Oracle. All rights reserved. Distributing Modular Applications: Introduction to Web Services.
Advertisements

Siebel Web Services Siebel Web Services March, From
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
Apache Struts Technology
Introduction to Web Services and Web API’s Richard Holowczak Baruch College December, 2014.
Web Services Darshan R. Kapadia Gregor von Laszewski 1http://grid.rit.edu.
Automating Bespoke Attack Ruei-Jiun Chapter 13. Outline Uses of bespoke automation ◦ Enumerating identifiers ◦ Harvesting data ◦ Web application fuzzing.
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.
Distributed components
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.
Presentation 7 part 2: SOAP & WSDL. Ingeniørhøjskolen i Århus Slide 2 Outline Building blocks in Web Services SOA SOAP WSDL (UDDI)
Latest techniques and Applications in Interprocess Communication and Coordination Xiaoou Zhang.
Technical Architectures
6/11/2015Page 1 Web Services-based Distributed System B. Ramamurthy.
Introduction to Service-Oriented Architecture. Outline Definition Features Examples of SOA Web Service Standards Example Pros and Cons Integration with.
Web Services Andrea Miller Ryan Armstrong Alex. Web services are an emerging technology that offer a solution for providing a common collaborative architecture.
Interpret Application Specifications
SIMULATING ERRORS IN WEB SERVICES International Journal of Simulation: Systems, Sciences and Technology 2004 Nik Looker, Malcolm Munro and Jie Xu.
1 Java Server Programming zLecture 1 focuses on: yIntroduction to web services y Web Services using Axis y The bigger Picture: Introduction to J2EE y Java.
Web services A Web service is an interface that describes a collection of operations that are network-accessible through standardized XML messaging. A.
UNIT-V The MVC architecture and Struts Framework.
T Network Application Frameworks and XML Web Services and WSDL Sasu Tarkoma Based on slides by Pekka Nikander.
Outline  Enterprise System Integration: Key for Business Success  Key Challenges to Enterprise System Integration  Service-Oriented Architecture (SOA)
1 HKU CSIS DB Seminar: HKU CSIS DB Seminar: Web Services Oriented Data Processing and Integration Speaker: Eric Lo.
James Holladay, Mario Sweeney, Vu Tran. Web Services Presentation Web Services Theory James Holladay Tools – Visual Studio Vu Tran Tools – Net Beans Mario.
International Telecommunication Union Geneva, 9(pm)-10 February 2009 ITU-T Security Standardization on Mobile Web Services Lee, Jae Seung Special Fellow,
Web Server Administration Web Services XML SOAP. Overview What are web services and what do they do? What is XML? What is SOAP? How are they all connected?
Lecture 15 Introduction to Web Services Web Service Applications.
Web Services Week 7 Aims: A detailed look at the underlying mechanisms for communication between web services Objectives: SOAP, WSDL, UDDI.
.Net and Web Services Security CS795. Web Services A web application Does not have a user interface (as a traditional web application); instead, it exposes.
The Network Performance Advisor J. W. Ferguson NLANR/DAST & NCSA.
WEB BASED DATA TRANSFORMATION USING XML, JAVA Group members: Darius Balarashti & Matt Smith.
XML Web Services Architecture Siddharth Ruchandani CS 6362 – SW Architecture & Design Summer /11/05.
Dr. Azeddine Chikh IS444: Modern tools for applications development.
1 Geospatial and Business Intelligence Jean-Sébastien Turcotte Executive VP San Francisco - April 2007 Streamlining web mapping applications.
INT-5: Integrate over the Web with OpenEdge® Web Services
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.
1 Web Services Web and Database Management System.
XML and Web Services (II/2546)
RSISIPL1 SERVICE ORIENTED ARCHITECTURE (SOA) By Pavan By Pavan.
Kemal Baykal Rasim Ismayilov
Web Services from 10,000 feet Part I Tom Perkins NTPCUG CertSIG XML Web Services.
Intro to Web Services Dr. John P. Abraham UTPA. What are Web Services? Applications execute across multiple computers on a network.  The machine on which.
1 Service Oriented Architecture SOA. 2 Service Oriented Architecture (SOA) Definition  SOA is an architecture paradigm that is gaining recently a significant.
.NET Mobile Application Development XML Web Services.
Introduction to Web Services Presented by Sarath Chandra Dorbala.
Copyright 2007, Information Builders. Slide 1 iWay Web Services and WebFOCUS Consumption Michael Florkowski Information Builders.
July 19, 2004Joint Techs – Columbus, OH Network Performance Advisor Tanya M. Brethour NLANR/DAST.
Web Services. Web Service: Simple definition : “ Service Offered On the Web “ Technically : “ A Web Service is a programmable application component that.
Software Architecture Patterns (3) Service Oriented & Web Oriented Architecture source: microsoft.
A service Oriented Architecture & Web Service Technology.
Added Value to XForms by Web Services Supporting XML Protocols Elina Vartiainen Timo-Pekka Viljamaa T Research Seminar on Digital Media Autumn.
A Semi-Automated Digital Preservation System based on Semantic Web Services Jane Hunter Sharmin Choudhury DSTC PTY LTD, Brisbane, Australia Slides by Ananta.
Java Web Services Orca Knowledge Center – Web Service key concepts.
SOFTWARE TESTING Date: 29-Dec-2016 By: Ram Karthick.
Web Programming Developing Web Applications including Servlets, and Web Services using NetBeans 6.5 with GlassFish.V3.
Sabri Kızanlık Ural Emekçi
WEB SERVICES.
T Network Application Frameworks and XML Web Services and WSDL Sasu Tarkoma Based on slides by Pekka Nikander.
Unit – 5 JAVA Web Services
Web Server Administration
Web services, WSDL, SOAP and UDDI
Distributed System using Web Services
Distributed System using Web Services
Techniques to Invoke Web Services from SAS
Presentation transcript:

Automated Testing and Response Analysis of Web Services Evan Martin Suranjana Basu Tao Xie Presenter - Ajith C Ajjarani

Outline Introduction Framework Implementation Evaluation Discussion Related work

Introduction Service-Oriented Architecture (SOA) is a software architectural style that aims to achieve loose coupling among interacting software agents Service providers and service consumers are components implements the SOA A service is a unit of work done by a service provider to achieve some end result for a service consumer

Exemplify usage of Web service A company may offer a service that allows its customers to search the product catalog. The company leverages the search service provided by Google to implement this functionality and thus relies on its correct operation.

Introduction(Contd..) A service provider may not be willing to share implementation details, source code, or other intellectual property to facilitate web-service testing conducted by another company. As a result, the ability to perform black-box robustness testing is needed

Introduction(Contd..) Web services can be implemented using any programming language on any platform, provided that a standardized XML interface description called Web Services Description Language (WSDL) is available and a standardized messaging protocol called Simple Object Access Protocol (SOAP) is used. Web services often run over HTTP but may run over other application layer transport protocols as well.

Features of web services SOAP WSDL - XML format for describing network services (UDDI)Universal Description, Discovery, and Integration - Information is used to locate a WSDL document, which can then be fed to a tool to generate a Java object proxy to the web service.

Challenge faced by a web service ? Ensuring its trustworthiness The client-specific information to the web service is provided as input parameters If the web service is not robust enough to handle the parameters, malicious users can manipulate different parameter options in order to retrieve unauthorized information.

Submitting extreme or random unexpected inputs result in two Scenarios A web service can respond with “Illegal access exception” OR It can allow illegal access to sensitive information in its database. If a web service responds with unexpected or uninformative exceptions, the client may crash while processing the response, causing robustness problems at the client side Thus a web service’s robustness problem can pose a major challenge to web service security and reliability.

Testing web services poses several challenges ! The unavailability of source code is a major challenge to white-box testing, as services are just provided as interfaces to the users and systems. This constraint makes black-box testing the only viable solution

How they have tested ?? Framework – WebSob and its supporting tool for automated robustness testing of web services. 2 Activities WebSob performs Given a description of the public interface to a service inWSDL, WebSob generates Java source code required for the service consumer to perform service requests on the service provider. b) WebSob also generates a wrapper class that maps a single method to each available service operation

How they have tested ?? This wrapper class is supplied to an existing test generation tool for Java programs such as Jcrasher , which generates JUnit tests Thus, WebSob helps detect robustness problems by analyzing the responses from the web service. They have tested WebSob to 35 freely available web services and there experiences show WebSob can quickly generate and execute web-service requests that revealed potential robustness problems in 15 web services with no knowledge of the underlying service implementation

Framework Overview - Websob

Framework - Websob Working model – Given a WSDL from a service provider First - WebSob generates code to facilitate both test generation and test execution.(code generation) Second – WebSob generates a test suite, which includes tests with random or extreme method-argument values. (test generation) Third - WebSob runs the generated test suite on the generated client code, which eventually invokes the web service.(test execution) Fourth - WebSob then collects the results returned from the web service (response analysis)

Framework - Websob The code generation component generates necessary code required to implement a service consumer + the component generates a wrapper class that can execute each service independently. The wrapper class contains the service calls .(code generation) JUnit tests are generated on this wrapper class to initiate SOAP requests to the service provider. (test generation) The test execution component executes the generated unit tests to cause the web service to be invoked and its responses to be collected. (test execution) The response analysis component classifies and analyzes the collected responses from the web service. (response analysis)

Code Generation Generates Java client side code from a service provider’s WSDL. WSDL is an XML-based language that describes the public interface of a service. Define protocol bindings, message formats, and supported operations that are required to interact with the web services

Classes or interfaces generated for each WSDL file: A Java class is generated to encapsulate each supported message format for both the input and output parameters to and from the service. A Java interface is generated to represent each port type, which defines the connection point to a web service. A Service interface and corresponding implementation is generated for each service. A wrapper class is generated to allow to invoke the provided service

Test Generation (Independent Component) Feeds the generated wrapper class to a Java unit-test generation tool to generate a test suite that exercises the services defined in the WSDL This component operates relatively independent of test generation tools and thus any unit test generation tool for Java (such as Jcrasher, Agitar Agitator, and Parasoft Jtest ) may be used. This generates extreme or special values besides random values for method arguments (high probability of causing robustness problems.)

Test Generation (Independent Component) Basic boundary values are explored for numeric data types such as -1, 0, and 1. For string-type arguments, the component generates strings of up to one hundred characters in length + the generated strings, the component puts in some special characters such as “!@#”. The component tries various possible combinations of several different special characters to form test inputs.

Test Execution Given the generated wrapper class, unit-test suite, and client-side implementation  Test execution component simply runs the generated tests, invoking methods in the wrapper class. Since the web service is remote, and faults and exceptions are expected to occur, we set a timeout parameter in the wrapper class of one minute for the execution of each test in the generated test suite. This timeout mechanism ensures that the test driver does not hang indefinitely during execution.

Response Analysis Manual inspection may be used to determine whether an exception should be considered to be caused by a) bug in the web service implementation or b) the supplied inputs’ violation of the service provider’s preconditions. For the latter case, the web service implementation should respond with an informative error message rather than simply crashing information. To collect web service responses - component acts as a man-in-the-middle between the service consumer and the service provider. The service consumer directs the service request to the component, which records the request and forwards the request to the service provider. The component also records the service response or error condition returned by the service provider.

4 main types of exceptions that may indicate robustness problems 404 File Not Found - HTTP standard response code indicating that the client was able to communicate with the server, but the server either could not find what was requested, or it was configured not to fulfill the request and not to reveal the reason. 405 Method Not Allowed - 500 Internal Server Exception.

Implementation (code generation) They have leveraged Axis, a Java implementation of the SOAP protocol, to generate client-side code from a service provider’s WSDL. In particular, the Axis utility class, WSDL2Java, parses the WSDL and generates necessary WSDL files that facilitate the implementation of service consumers http://ws.apache.org/axis/java/user-guide.html#WSDL2JavaBuildingStubsSkeletonsAndDataTypesFromWSDL

Implementation (code generation)

Implementation (Test generation) They have modified JCrasher, a third-party test generation tool that automatically generates JUnit tests for a given Java class. Like in - JCrasher to generate additional values for numeric arguments such as the maximum and minimum values supported by that type, other then (−1, 0, and 1) for arguments with the integer type.

Implementation (Test Execution) JUnit to execute the unit tests against the wrapper class, which invokes the remote web service. JUnit [16] is a regression testing framework that is used to execute a unit-test suite against the class under test

Implementation (Response Analysis) TCPMonitor, which is the Axis utility provided to monitor the SOAP service being used. They have passed the SOAP message information to the SOAP monitor service, which communicates with the target service to be tested. The SOAP message text is displayed through a web browser interface, by using an applet that opens a socket connection to the SOAP monitor service. http://ws.apache.org/axis/java/user-guide.html#AppendixUsingTheAxisTCPMonitorTcpmon

Evaluation

WebSob is applied on the 35 freely available web services listed in Table. The first column lists the location of the WSDL file and the last four columns indicate the four categories of described responses. Thousands of requests have been quickly generated and executed for each web service

The WSDL files have some common identification tags that are used by our framework to generate tests. wsdl:operation, wsdl:input & wsdl:output, wsdl:message. Table indicates special-character string input (SC), long string input (LS), and a null reference (NULL) as three categories of test inputs that have resulted in one of the four types of responses SC - non-alpha-numeric characters. LS - string of length greater than100 characters. Null is encoded with the xsi:nil attribute

Results WebSob executed a set of tests with static correct key and key generated by JCrasher. As expected, Google returned a 500 Internal Server Error when the key is incorrect. “Exception from service object: Invalid authorization key.” Found in the CurrencyExchangeService hosted by www.xmethods.net. This web service returns the exchange rate between two currencies and hangs indefinitely for some inputs. In summary, there experience on applying WebSob on these 35 web services shows that WebSob is effective in generating tests that can expose cases leading to potential robustness problems. They reveal robustness problems of15 web services with no knowledge of the underlying service implementation.

References Axis User Guide http://xml.nig.ac.jp/index.html

Questions ..