A-Team Tech Talk Series. SOA Unit Testing. Olivier LeDiouris, Oracle A-Team



Similar documents
Continuous Integration For Fusion Middleware

1 What Are Web Services?

1 What Are Web Services?

Oracle Service Bus. Situation. Oracle Service Bus Primer. Product History and Evolution. Positioning. Usage Scenario

Business Process Execution Language for Web Services

WebLogic Server: Installation and Configuration

Automating Testing and Configuration Data Migration in OTM/GTM Projects using Open Source Tools By Rakesh Raveendran Oracle Consulting

Copyright 2012, Oracle and/or its affiliates. All rights reserved.

SERVICE ORIENTED ARCHITECTURE

BUSINESS RULES CONCEPTS... 2 BUSINESS RULE ENGINE ARCHITECTURE By using the RETE Algorithm Benefits of RETE Algorithm...

Oracle Service Bus Examples and Tutorials

Oracle SOA Suite 11g: Essential Concepts Student Guide

Module 13 Implementing Java EE Web Services with JAX-WS

An Introduction to Globus Toolkit 3

Oracle SOA Suite: The Evaluation from 10g to 11g

Integration eines SOA Repositories mit Subversion zur Anbindung an den ESB

Oracle Fusion Middleware 11g R1 - Weblogic Server for System z. Marc Connolly Technical Development Director

BUILDING FLEXIBLE ENTERPRISE PROCESSES USING ORACLE BUSINESS RULES AND BPEL PROCESS MANAGER. An Oracle White Paper Jan 2005

Integration Knowledge Kit Developer Journal

rpafi/jl open source Apache Axis2 Web Services 2nd Edition using Apache Axis2 Deepal Jayasinghe Create secure, reliable, and easy-to-use web services

Enabling Continuous Delivery for Java Projects with Oracle Cloud Services (Oracle PaaS) Siva Rama Krishna Oracle India

<Insert Picture Here> Application Testing Suite Overview

Query JD Edwards EnterpriseOne Customer Credit using Oracle BPEL Process Manager

E-Business Suite Oracle SOA Suite Integration Options

Application Testing Suite: A fully Java-based software testing platform for testing Oracle E-Business Suite and other web applications

JAX-WS Developer's Guide

Oracle Exam 1z0-102 Oracle Weblogic Server 11g: System Administration I Version: 9.0 [ Total Questions: 111 ]

Implementing Web Services in Oracle Database Applications

MOBILIZING ORACLE APPLICATIONS ERP. An Approach for Building Scalable Mobility Solutions. A RapidValue Solutions Whitepaper

What I Advise Every Customer To Do On Their Oracle SOA Projects

Introduction to Oracle WebLogic. Presented by: Fatna Belqasmi, PhD, Researcher at Ericsson

Department of Veterans Affairs VistA Integration Adapter Release Enhancement Manual

WEB SERVICES. Revised 9/29/2015

Oracle SOA Hands-On-Workshop. Arne Brüning - Bernhard Fischer-Wasels Leitende Systemberater

OWB Users, Enter The New ODI World

Enterprise Manager 12c for Middleware

Developing Web Services Applications

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

IBM SPSS Collaboration and Deployment Services Version 6 Release 0. Single Sign-On Services Developer's Guide

Application Testing Suite Oracle Load Testing Introduction

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

Profiling and Testing with Test and Performance Tools Platform (TPTP)

TG Web. Technical FAQ

Oracle WebLogic Server 11g: Administration Essentials

An Oracle White Paper November Oracle Primavera P6 EPPM Integrations with Web Services and Events

Oracle EXAM - 1Z Java EE 6 Web Services Developer Certified Expert Exam. Buy Full Product.

Java EE 6 development with Eclipse, Netbeans, IntelliJ and GlassFish. Ludovic Champenois Oracle Corporation

<Insert Picture Here>

Don t get it right, just get it written.

Beeple, B-Pel, Beepul? Understanding BPEL and Its Role in SOA

Performance Testing Oracle SOA Platform and Services

Oracle Fusion Middleware

Administering batch environments

FileNet Business Activity Monitor (BAM) Release Notes

Unit Testing webmethods Integrations using JUnit Practicing TDD for EAI projects

WELCOME. Where and When should I use the Oracle Service Bus (OSB) Guido Schmutz. UKOUG Conference

Developing Web Services with Eclipse and Open Source. Claire Rogers Developer Resources and Partner Enablement, HP February, 2004

Qualogy M. Schildmeijer. Whitepaper Oracle Exalogic FMW Optimization

soapui Product Comparison

How To Develop A Web Service In A Microsoft J2Ee (Java) 2.5 (Oracle) 2-Year Old (Orcient) 2Dj (Oracles) 2E (Orca) 2Gj (J

Meister Going Beyond Maven

PEtALS Quick Start. PEtALS Team Roland NAUDIN - February

COM 440 Distributed Systems Project List Summary

Copyright 2013, Oracle and/or its affiliates. All rights reserved.

Web Services Development for IBM WebSphere Application Server V7.0. Version: Demo. Page <<1/10>>

Oracle Managed File Getting Started - Transfer FTP Server to File Table of Contents

INSTALLING AND INVOKING ORACLE DATA INTEGRATOR (ODI) PUBLIC WEB SERVICES

Chapter 1: Web Services Testing and soapui

Objectif. Participant. Prérequis. Pédagogie. Oracle SOA Suite 11g - Build Composite Applications. 5 Jours [35 Heures]

SSL CONFIGURATION GUIDE

Avoiding Web Services Chaos with WebSphere Service Registry and Repository

How to Enable Remote JMX Access to Quartz Schedulers. M a y 1 2,

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

Oracle WebLogic Server

WebLogic Server Foundation Topology, Configuration and Administration

Regression & Load Testing BI EE 11g

Configuring and Managing a Private Cloud with Enterprise Manager 12c

Application. 1.1 About This Tutorial Tutorial Requirements Provided Files

Oracle Utilities Customer Care and Billing Integration to Oracle Utilities Meter Data Management

Web Services in Oracle Fusion Middleware. Raghu Kodali Consulting Product Manager & SOA Evangelist Oracle Fusion Middleware Oracle USA

Managing Application Performance with JBoss Operations Network and OC Systems RTI

Learn Oracle WebLogic Server 12c Administration For Middleware Administrators

Oracle E-Business Suite (R12) Integration with OID/OAM 11g

Acknowledgments. p. 55

Service-Oriented Architecture and Software Engineering

SOA Solutions & Middleware Testing: White Paper

Exam Name: IBM WebSphere Process Server V6.2,

Oracle Managed File Transfer SOA Integration

Securing SAS Web Applications with SiteMinder

5 Days Course on Oracle WebLogic Server 11g: Administration Essentials

Preface. Motivation for this Book

OpenSSO: Simplify Your Single-Sign-On Needs. Sang Shin Java Technology Architect Sun Microsystems, inc. javapassion.com

Oracle Data Integrator 11g New Features & OBIEE Integration. Presented by: Arun K. Chaturvedi Business Intelligence Consultant/Architect

Talend Open Studio for ESB. Release Notes 5.2.1

Reusing Existing * Java EE Applications from Oracle SOA Suite

Smart Business Processes using Oracle Business Rules

Workshop for WebLogic introduces new tools in support of Java EE 5.0 standards. The support for Java EE5 includes the following technologies:

Transcription:

A-Team Tech Talk Series SOA Unit Testing Olivier LeDiouris, Oracle A-Team

Agenda What is Unit Testing Service Unit Testing SOA Unit Testing Techniques and Tools Demo Challenges Questions?

What is Unit Testing Where this comes from "Let them write code!" Whoever writes code also writes the code to test it. Designed to nail down the origins of a problem Not necessarily dedicated to Java JUnit Annotations and Reflection Compatible with Ant Compatible with Continuous Build Systems

Service Unit Testing What is a Service? Whatever comes with a Web Service Description Language (WSDL) document.

Service Unit Testing Service Patterns Synchronous Asynchronous 1 way Asynchronous 2 way... Security With or without security Timeout With or without timeout

Service Unit Testing Service Reaction Positive & Negative Testing Positive: Does it work as expected? Negative: Does it fail as expected? For example: raises the appropriate error For example: appropriately rejects invalid credentials Does it "react" in a timely manner?

Service Unit Testing Patterns All services that follow the same pattern can be tested with the same code The only differences between two such tests will be the values used for the test Value of the endpoint URL Value of the input payload Value of the namespace URI And so on Those values can be externalized Properties files, Databank, NoSQL DB, etc.

Service Unit Testing A service is not necessarily written in Java For example: an SOA Composite The author of the service is also the author of the tests As such, the author of the properties files containing the data to test the service with, according to its pattern. The test pattern development belongs to another team.

Service Unit Testing All patterns may have actions in common, performed before the actual test: Is the WSDL URL valid? Is the service up? Is the service name valid? Is the input payload valid? Are the port name, operation valid? And so on

Service Unit Testing A challenge/requirement Implementation of a test pattern should be as easy as possible (or even more) Once a pattern is developed, it's all driven by external data (like properties files) The services development teams should collaborate with the service test patterns development team to elaborate a test patterns catalog.

Service Unit Testing Example Service Test Patterns, using Java and JAX-WS <property name="async.one.way" value="unittests.patterns.services.asynchronousonewayunittest"/> <property name="synchronous" value="unittests.patterns.services.synchronousserviceunittest"/> <property name="async.two.ways" value="unittests.patterns.services.asynchronoustwowayunittest"/> Invoked from Ant & JUnit <target name="unit.test.synchronous"> <echo> ==================================== Testing Synchronous Service ==================================== outputfile: synchronous </echo> <junit printsummary="yes" fork="yes" showoutput="yes" failureproperty="synchronous.fail"> <classpath refid="classpath"/> <formatter type="xml"/> <sysproperty key="verbose" value="${verbose}"/> <sysproperty key="properties.file.name" value="generic-service-test-synchronous.properties"/> <test name="${synchronous}" haltonfailure="no" outfile="synchronous"/> </junit> <antcall target="in.case.synchronous.fails"/> </target>

Service Unit Testing Example Properties file for a given test wsdl.url=http://${proxy.name}:${soa.port.number}/soa-infra/.../.../synchronousbpelprocess_client_ep?wsdl service.name=synchronousbpelprocess_client_ep service.port=synchronousbpelprocess_pt service.operation=process service.ns.uri=http://xmlns.oracle.com/soatesthelper/s.../synchronousbpelprocess service.input.payload.file=generic-sync.input.xml service.output.payload.file=generic-sync.output.xml move.on.if.payload.is.invalid=true # service.response.timeout=2000

SOA Unit testing More patterns, more complex Responding synchronously and moving on asynchronously Responding asynchronously, several times in a row Interacting with the Tasklist Service (parallel tasks within a test) Interacting with Rules Engine Reacting to Business Event(s) Availability of the Audit Trail Go to the repository to check the Audit Trail of a given instance

SOA Unit testing As with any other kind of testing, SOA Tests must be non-intrusive. That means that no extra components need to be deployed or installed on the server(s) where the target services reside.

SOA Unit testing A note about Rules Rules can be run and tested outside of the scope of a Composite. A Rules Dictionary does not even need to be deployed anywhere to be run. Rules can be unit tested in standalone mode. Rules are used in the SOA World through a Decision Service Invoke a Decision Function that: Assert facts Run RuleSet(s) Retrieve facts

Testing Tools SOAP-UI Free version available (http://soapui.org) Powerful and easy to use JAX-WS Not a testing tool in itself, But part of the JDK, since Java 1.6 SOA Test Suite Oracle Application Testing Suite (OATS) OpenScript

Demo With Ant and JUnit Testing Services & SOA Artifacts

With OATS/OpenScript OpenScript runs as an Eclipse plugin It loads its own stack of components and classes Some are conflicting with the utility classes used previously The easiest way to avoid those conflicts is to have two separate JVMs. An RMI connection will allow the two JVMs to communicate RMI requires no extra infrastructure (no WLS, etc.) The same scripts can be used for Unit Testing and Load testing

With OATS/OpenScript JVM 1 JVM 2 OpenScript With the Stub as a Script Asset RMI Stub RMI Only Serializable types can go back and forth between the JVMs RMI Skeleton JAX-WS & SOA Utilities ServiceUnitTestHelper and other utilities

Demo With OpenScript

Remaining Challenges Test coverage A test that fails means there is a problem If none of your tests fail, that does not mean there are no problems Test execution time Allocate enough time and resources for test development and execution, this is not to be under-estimated Test execution reporting Send the reports to the relevant persons

Questions?

Software Links WebLogic http://www.oracle.com/technetwork/middleware/ias/downloads/wls-main-097127.html SOA Suite http://www.oracle.com/technetwork/middleware/soasuite/downloads/index.html JDeveloper http://www.oracle.com/technetwork/developer-tools/jdev/downloads/index.html OATS and OpenScript http://www.oracle.com/technetwork/oem/downloads/index-084446.html SOA Testing Snippets http://java.net/projects/soa-testing-snippets https://code.google.com/p/oracle-business-rules-tester/

Recommended reading

A-Team Tech Talks Series SOA Unit Testing