test driven soa suite 12c upgrade

34
© OPITZ CONSULTING GmbH 2016 Slide 1 Test-Driven SOA Suite 12c Upgrade June 2016 Test-Driven SOA Suite 12c Upgrade Danilo Schmiedel Solution Architect | Oracle ACE Director OPITZ CONSULTING Deutschland GmbH Sven Bernhardt Solution Architect | Oracle ACE OPITZ CONSULTING Deutschland GmbH Lessons Learned and Best Practices

Upload: sven-bernhardt

Post on 12-Apr-2017

540 views

Category:

Software


6 download

TRANSCRIPT

Page 1: Test driven Soa Suite 12c Upgrade

© OPITZ CONSULTING GmbH 2016 Slide 1Test-Driven SOA Suite 12c Upgrade

June 2016

Test-Driven SOA Suite 12c Upgrade

Danilo SchmiedelSolution Architect | Oracle ACE DirectorOPITZ CONSULTING Deutschland GmbH

Sven BernhardtSolution Architect | Oracle ACEOPITZ CONSULTING Deutschland GmbH

Lessons Learned and Best Practices

Page 2: Test driven Soa Suite 12c Upgrade

© OPITZ CONSULTING GmbH 2016 Slide 2Test-Driven SOA Suite 12c Upgrade

Oracle SOA 12c @ Opitz

- First Oracle SOA / BPEL project in 2006

- Implemented multiple 10g to 11g projects

- Wide knowledge with Side-by-Side upgrades based on Enterprise DeploymentGuide

n Oracle Platinum Partner, founded in 1990, located in Germany and Poland

n Specialized in many products across the Oracle portfolio

n 2 Oracle ACE Directors and 2 Oracle ACEs

n Recognized as one of the leading Oracle Fusion Middleware Partners

n 2015 & 2014: BPM Partner Community Award

2010: Fusion Middleware Award

2008 – 2010: EMEA SOA Community Award

About OPITZ CONSULTING

- Experienced with In-Place Upgrades long running / stateful processes with minimal downtime

- Products included in upgraded solutions: - Oracle SOA Suite12c - Oracle OSB 12c- Oracle BAM 12c

Page 3: Test driven Soa Suite 12c Upgrade

© OPITZ CONSULTING GmbH 2016 Slide 3Test-Driven SOA Suite 12c Upgrade

Reasons for upgrading to 12cü Enriched Error Hospital with extensive filters, search panels and bulk recovery facilities

ü Improved Business Activity Monitoring with multi-browser support

ü Embedded (local) SOA Suite in JDeveloper

ü Improved MDS integration to share artifacts within and across applications

ü Free choice between XSLT / XQuery

ü Version 12.2.1 is based on Java 8

ü Out-of-the-box Maven Support

ü Increased developer productivity with one unified IDE for OSB & SOA

ü New REST / JSON Support

Page 4: Test driven Soa Suite 12c Upgrade

© OPITZ CONSULTING GmbH 2016 Slide 4Test-Driven SOA Suite 12c Upgrade

Upgrade Process | Step-by-Step Overview1. Understand the upgrade process

2. Define a To-Be Topology

3. Decide on an upgrade strategy that fits to your requirements

4. Pre-Upgrade Tasks

5. Install 12c Software

6. Create or upgrade schemas

7. Domain (Re-) Configuration

8. Upgrade the projects (and deploy if needed)

9. Post Upgrade Steps

10. Verify Upgrade Results (Test)

PREPARATION

INFRASTRUCTURE SETUP

CODE UPGRADE

Page 5: Test driven Soa Suite 12c Upgrade

© OPITZ CONSULTING GmbH 2016 Slide 5Test-Driven SOA Suite 12c Upgrade

Upgrade Process | Step-by-Step – Preparation1. Understand the upgrade process

ü Understand upgrade conceptsü Understand the Basic 12c Upgrade Tasksü Understand the SOA Cluster Upgrade Topologyü Understand the Oracle Service Bus Upgrade to 12cü Understand an Upgrade to Business Activity Monitoring in 12cü Understand SOA Domain Upgrade Restrictions

2. Define a To-Be Topologyü Understand new and changed features of 12c (12.2.1)ü Understand an Enterprise Deploymentü Decide on components (e.g. SOA, OSB, BAM, etc.)ü Shared Weblogic Domain (for OSB / SOA / BAM) vs. separate Weblogic Domains ü Non Cluster vs. Cluster

Page 6: Test driven Soa Suite 12c Upgrade

© OPITZ CONSULTING GmbH 2016 Slide 6Test-Driven SOA Suite 12c Upgrade

Upgrade Process | Step-by-Step – Preparation (2)3. Decide on an upgrade strategy that fits to your requirements

§ In-Place Upgradeü Schemas and domain directory upgrades are performed "in place" (updates existing 11g files)ü Oracle Home binaries are upgraded "out of place" (binaries are installed in a new directory)ü No need to redeploy composites after upgradeü Suitable for long running instances which should resume after upgrade

§ Side-by-Side Upgrade ü New installation of schemas and domainsü New deployment& configuration of the existing 11g projectsü Suitable in stateless & short-running scenariosü Appropriate if the targeted sytem architecture should be diferent than with 11g or if the current topology is not

supported

Page 7: Test driven Soa Suite 12c Upgrade

© OPITZ CONSULTING GmbH 2016 Slide 7Test-Driven SOA Suite 12c Upgrade

Upgrade Process | Step-by-Step - Infrastructure4. Pre-Upgrade Tasks

ü Complete all applicable tasks from the Pre-Upgrade Checklistü Check if your To-Be Topology is supported

ü Perform General Pre-Upgrade Tasksü Perform the SOA-Specific Pre-Upgrade Tasksü Perform the Pre-Upgrade Tasks for Oracle BAM ü Perform the Pre-Upgrade Tasks for Oracle Service Bus (OSB)

ü Validate your starting pointwhich has to be 11.1.1.6 (PS5) or 11.1.1.7 (PS6)ü Calculate system requirements (Memory, Disk Space, Network, OS)ü Make a complete backup of your existing environmentü Make sure that DB, OS and JVM are supported and apply recommended database parameters on the new

installationü Save copies of customized start scripts, configuration files, policies

ü More details: Upgrade Planning Guide and Interoperability and Compatibility Guide

Page 8: Test driven Soa Suite 12c Upgrade

© OPITZ CONSULTING GmbH 2016 Slide 8Test-Driven SOA Suite 12c Upgrade

Upgrade Process | Step-by-Step - Infrastructure (2)5. Install 12c Software

ü Download the Oracle Fusion Middleware Infrastructure distribution from the Oracle ADF download page on OTN or from the Oracle Software Delivery Cloud

ü Download the production distribution for Oracle SOA Suite and Business Process Management from the Oracle Software Delivery Cloud

ü Download the production distribution for Oracle Service Bus from the Oracle Software Delivery Cloud

ü Roadmap for Installing and Configuring the Standard Installation Topologiesü Verify the Installation Checklistü Install Infrastructure distribution and the appropriate componentsü Verify the Installation

ü For a development or evaluation distribution, see "Downloading Oracle Fusion Middleware 12c (12.2.1) Development Distributions“

Page 9: Test driven Soa Suite 12c Upgrade

© OPITZ CONSULTING GmbH 2016 Slide 9Test-Driven SOA Suite 12c Upgrade

Upgrade Process | Step-by-Step - Infrastructure (3)6. Database Schemas

ü Create the required Database Schemas ü Preparing to Upgrade SOA Schemas (In-Place Upgrade only)ü Upgrade Schemas with the Upgrade Assistant (In-Place Upgrade only)

7. Domain (Re-) Configurationü Configure the Domain (Side-by-Side Upgrade)ü Reconfigure the Domain using the Reconfiguration Wizard (In-Place Upgrade)ü Upgrade the Domain Component Configurations using the Upgrade Assistant (In-Place Upgrade)

Page 10: Test driven Soa Suite 12c Upgrade

© OPITZ CONSULTING GmbH 2016 Slide 10Test-Driven SOA Suite 12c Upgrade

Upgrade Process | Step-by-Step - Code Upgrade8. Upgrade the projects (and deploy if needed)

ü Open projects in JDeveloper 12c, the Migration Assistentmigrates the project filesü or Upgrade JDeveloper Projects in Bulkü Migrate Oracle Service Bus Resources from Previous Releasesü Deploy Applications (Side-by-Side Upgrade)

9. Post Upgrade Stepsü General Post-Upgrade Tasksü Post-Upgrade Tasks for Oracle Service Busü Post-Upgrade Tasks for Clustersü Post-Upgrade Tasks for BAM

Page 11: Test driven Soa Suite 12c Upgrade

© OPITZ CONSULTING GmbH 2016 Slide 11Test-Driven SOA Suite 12c Upgrade

Upgrade Process | Step-by-Step - Code Upgrade10. Verify your results (Test)

ü Testing before and after the upgrade is the key to success!ü Define and documentall testcases in advanceü Make sure that you have a complete test approach in place bevore you start your upgrade ü Esablish a test approach that covers all relevant test layers (Elementary Unit Tests, Component Tests, End-to-

End Tests)

ü We decided to build our own OC testing framework based on JUnitStandard and SOA Suite APIs to integrateit within other implementations and to establish a proper test-driven development

ü This allows us toü use the same test approach for BPEL, BPMN, OSB, Java, Human Tasks, XSLT and XQuery…ü re-route external references to a mock service implemented in the same framework (in Java) including

changing references to standard web services so that database or file adapters can also be mockedü Human task handling (finishing the human task with a predefined outcome and predefined values)ü Smooth integration into continuous integration environment

ü More details will be published on http://thecattlecrew.net

Page 12: Test driven Soa Suite 12c Upgrade

© OPITZ CONSULTING GmbH 2016 Slide 12Test-Driven SOA Suite 12c Upgrade

Why testing?n Validate that the upgrade was successful!

n Testing in SOA/Integration projects is essentialn Ensure technical functionality and operational correctnessn Improve code qualityn Allow changes efficientlyn Speed up development

n Approachesn Manual testingn Oracle SOA Suite OOTB testing capabilitiesn OC SOA Testing Framework

Page 13: Test driven Soa Suite 12c Upgrade

© OPITZ CONSULTING GmbH 2016 Slide 13Test-Driven SOA Suite 12c Upgrade

Test maturityn Status quo: Where we are and where we want to be

Source: https://developer.ibm.com/urbancode/docs/continuous-delivery-maturity-model/

Desiredstate

Usual state inIntegration projects

No tests

Page 14: Test driven Soa Suite 12c Upgrade

© OPITZ CONSULTING GmbH 2016 Slide 14Test-Driven SOA Suite 12c Upgrade

Testing assetsn Transformations

n Xqueryn XSLT

n Custom Java functionalitiesn Java calloutsn Custom XPath functions

n Service implementationsn JAX-WS/JAX-RS Webservicesn SB servicesn SOA composites

Page 15: Test driven Soa Suite 12c Upgrade

© OPITZ CONSULTING GmbH 2016 Slide 15Test-Driven SOA Suite 12c Upgrade

Testing areas

OTM NAV

ProcessLayer

Service Layer

(Facades)

System Layer

Page 16: Test driven Soa Suite 12c Upgrade

© OPITZ CONSULTING GmbH 2016 Slide 16Test-Driven SOA Suite 12c Upgrade

Elementary (Unit) tests of Transformations and custom Java functionalities

CRM ERP

ProcessLayer

Service Layer

(Facades)

System Layer

Page 17: Test driven Soa Suite 12c Upgrade

© OPITZ CONSULTING GmbH 2016 Slide 17Test-Driven SOA Suite 12c Upgrade

Service/Process component tests on local Dev Environments

CRM ERP

ProcessLayer

Service Layer

(Facades)

System Layer

ElementaryTests

ElementaryTests

ElementaryTests

Mock MockMock

MockMockMock

Page 18: Test driven Soa Suite 12c Upgrade

© OPITZ CONSULTING GmbH 2016 Slide 18Test-Driven SOA Suite 12c Upgrade

CRM ERP

ProcessLayer

Service Layer

(Facades)

System Layer

ProcessTests

ComponentTests

MockMockMock

Service component tests on shared Test Environment

Page 19: Test driven Soa Suite 12c Upgrade

© OPITZ CONSULTING GmbH 2016 Slide 19Test-Driven SOA Suite 12c Upgrade

CRM ERP

ProcessLayer

Service Layer

(Facades)

System Layer

End-to-EndTests

End-to-End Tests on Integration Environments

Page 20: Test driven Soa Suite 12c Upgrade

© OPITZ CONSULTING GmbH 2016 Slide 20Test-Driven SOA Suite 12c Upgrade

Types of tests

Load/Performance/Stability tests

E2E tests

Process component tests

Service component tests

Transformation tests (XQuery, XSLT)Custom Java functionalities

Pre-deployTests

Post-deployTests

Cov

erag

e

Exec

utio

n tim

e

Com

plex

ity

Page 21: Test driven Soa Suite 12c Upgrade

© OPITZ CONSULTING GmbH 2016 Slide 21Test-Driven SOA Suite 12c Upgrade

Oracle SOA OOTB testing capabilitiesn Design-time tests for transformations (XQuery, XSLT)

n Design-time tests for Business rules

n Test suites for SOA compositesn Mocking of services/inbound messsages (Process initiation) at composite leveln Mocking of references/outbound messages (Emulations) at composite leveln Definition of XML assertions (Strict and similar)n Define tests for BPEL components on BPEL activity level

n Variable and fault assertionsn Bypass blocking activities like waitsn Assert activity executions

n No testing capability for Mediator, Human Task, BPMN

Page 22: Test driven Soa Suite 12c Upgrade

© OPITZ CONSULTING GmbH 2016 Slide 22Test-Driven SOA Suite 12c Upgrade

OC SOA Testing Frameworkn Java-based framework

n Developed and enhanced in projects

n Uses provided Oracle APIs

n Supports SOA Suite 11g and 12c

n Supports SB service testing

n Supports integration testing for SB and SOA composites

n Consistent integration in CI environment

n Earns further maturity through usage in international projects

Page 23: Test driven Soa Suite 12c Upgrade

© OPITZ CONSULTING GmbH 2016 Slide 23Test-Driven SOA Suite 12c Upgrade

Featuresn Execute XQuery and XSLT tests

n Validate XML requests and responses

n Call services

n Intercept service calls

n Mock services (WS, JCA adapters, Human tasks)

n Manipulate runtime artifacts (DVMs, SB pipelineconfigurations/properties)

n Check execution of BPMN audit trail (activty execution, etc.)

Page 24: Test driven Soa Suite 12c Upgrade

© OPITZ CONSULTING GmbH 2016 Slide 24Test-Driven SOA Suite 12c Upgrade

Comparison OOTB Testing vs. OC SOA Testing

OOTB OC SOA TestingTest-driven approach ➖ ✔ ️

Runtime tests (✔ ️) only composites ✔ ️

Possibility for test automation (✔ ️) only for composites ✔ ️

Mocking ✔ ️ ✔ ️

Support for test types• Unit• Isolation• Integration

(✔ ️) at Design-time only✔ ️

➖ (only manual)

✔ ️

✔ ️✔ ️

Page 25: Test driven Soa Suite 12c Upgrade

© OPITZ CONSULTING GmbH 2016 Slide 25Test-Driven SOA Suite 12c Upgrade

Benefitsn Test-Driven Development (TDD)

n Common approach in Java/JEE developmentn Ensures that intended behavior is tested properly

n Consistent testing approach

n Flexibility

n Extensibility

Anti-Pattern

Page 26: Test driven Soa Suite 12c Upgrade

© OPITZ CONSULTING GmbH 2016 Slide 26Test-Driven SOA Suite 12c Upgrade

OC SOA Testing – SOA compositesTest Client SOA Server

SAR

SAR (original)

SAR (manipulate

d)

SAR (manipulate

d)

Download Composite

Execute test

Upload CompositeSAR

(original)

SAR (original)

Mock services

Check

Page 27: Test driven Soa Suite 12c Upgrade

© OPITZ CONSULTING GmbH 2016 Slide 27Test-Driven SOA Suite 12c Upgrade

OC SOA Testing – SB servicesTest Client SB Server

SBAR

Create Session

Execute test SBAR (manipulate

d)

Manipulate Service

Commit Session

Rollback Changes SBAR

Mock services

Check

Page 28: Test driven Soa Suite 12c Upgrade

© OPITZ CONSULTING GmbH 2016 Slide 28Test-Driven SOA Suite 12c Upgrade

Demo – VacationApplicationProcess

VacationApplicationProcess

VacationService

Page 29: Test driven Soa Suite 12c Upgrade

© OPITZ CONSULTING GmbH 2016 Slide 29Test-Driven SOA Suite 12c Upgrade

Straight Forward

ü Code upgrade with standard composites (usingBPEL, Database and File adapters) à Testcasessuccessfully completed without any manual rework

ü Database Adapter for stored procedure calls performed well after upgrade

ü Successfully transferred config changes like JTA Transaction Timeout, Transaction Timeout of Beans and SyncMaxWaitTime

ü Enabling of new Auto Purge function to avoidDatabase growth

ü Deployment via Maven

What we‘ve learned…Prepare for more complexityü Upgrading from Oracle BAM 11g to BAM 12c cannot be

handled with the standard upgrade procedures

ü OWSM / JDeveloper and Custom Policies because of deprecated functions

ü HA Infrastructure setup took longer than our code upgrade

ü Namespaces / Prefixes of some ext. XPath functionshave changed (solved via search & replace)

ü Challenges while upgrading large composites à fixed in Doc ID 2021736.1

ü Version 12.2.1 runs under JDK8 which can result in additional work

Page 30: Test driven Soa Suite 12c Upgrade

© OPITZ CONSULTING GmbH 2016 Slide 30Test-Driven SOA Suite 12c Upgrade

Best Practicesü High test coverage: define testcases well in advance and compare results before and after the

upgrade

ü Use a test framework that allows efficient (re-)execution of testcases for OSB and SOA -including Mocks, Component and End-to-End Tests (e.g. OC Testframework)

ü Testing and pre-upgrade steps are the key points of success

ü Documentation about changed configuration parameters is important (document before upgrade)

ü Plan the Infrastructure upgrade well in advance

ü Install BAM on a separate WLS domain to decouple runtime and monitoring cmponents frompatching cycles (reduce downtimes)

ü Consider BAM Best Practices from the beginning

Page 31: Test driven Soa Suite 12c Upgrade

© OPITZ CONSULTING GmbH 2016 Slide 31Test-Driven SOA Suite 12c Upgrade

Material§ Presentation: What's Stopping You from Upgrading to Oracle SOA Suite 12c?

http://goo.gl/HGDIqF

§ Slideshare: Road to SOA Suite 12c http://de.slideshare.net/opitzconsulting/doag-2014-roadtosoasuite12cschmiedel

§ Video: 2 Minute Tech Tiphttps://blogs.oracle.com/archbeat/entry/2mtt

§ Troubleshooting the Upgradehttp://docs.oracle.com/middleware/1213/core/FUPSS/know_base.htm#FUPSS339

§ Oracle® Fusion Middleware Upgrading to the Oracle Fusion Middleware Infrastructurehttps://docs.oracle.com/middleware/1221/core/INFUP/toc.htm

§ Oracle® Fusion Middleware Upgrading SOA Suite and Business Process Managementhttps://docs.oracle.com/middleware/1221/core/FUPSS/toc.htm

Page 32: Test driven Soa Suite 12c Upgrade

© OPITZ CONSULTING GmbH 2016 Slide 32Test-Driven SOA Suite 12c Upgrade

Q & A

Page 33: Test driven Soa Suite 12c Upgrade

© OPITZ CONSULTING GmbH 2016 Slide 33Test-Driven SOA Suite 12c Upgrade

Contact Details

Danilo SchmiedelSolution Architect | Oracle ACE Director

OPITZ CONSULTING Deutschland GmbHTempelhofer Weg 64, 12347 Berlin, Germanyhttp://www.opitz-consulting.com

Phone: +49 173 7279001Mail: [email protected]

@dschmied

http://inside-bpm-and-soa.blogspot.com & http://thecattlecrew.net

Page 34: Test driven Soa Suite 12c Upgrade

© OPITZ CONSULTING GmbH 2016 Slide 34Test-Driven SOA Suite 12c Upgrade

Contact Details

Sven BernhardtSolution Architect | Oracle ACE

OPITZ CONSULTING Deutschland GmbHKirchstrasse 6, 51647 Gummersbach, Germanyhttp://www.opitz-consulting.com

Phone: +49 172 2193529Mail: [email protected]

@sbernhardt

http://thecattlecrew.net