Test driven Soa Suite 12c Upgrade

689 Aufrufe

Veröffentlicht am

Quality assurance and testing strategies are the key to success in all software projects. For this reason a continious test-driven development approach becomes an important part in the lifecycle of a software solution. In this session wed like to share tips, tricks and best practices for upgrading to SOA Suite 12c by following a strict test-driven approach. Learn how to leverage from a custom JUnit-based Testframework to verify upgrade results with tests before and after moving to Oracle SOA 12c. See how we established the same test approach for BPEL, BPMN, OSB, Java, Human Tasks, XSLT and XQuery across all relevant test layers (Elementary Unit Tests, Component Tests, End-to-End Tests). The session will give you an excellent overview to choose the right migration approach for your project and a kick-start to build your Oracle middleware solutions

Veröffentlicht in: Software
  • Als Erste(r) kommentieren

Test driven Soa Suite 12c Upgrade

  1. 1. © OPITZ CONSULTING GmbH 2016 Slide 1Test-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
  2. 2. © OPITZ CONSULTING GmbH 2016 Slide 2Test-Driven SOA Suite 12c Upgrade Oracle SOA 12c @ Opitz - First Oracle SOA / BPEL projectin 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
  3. 3. © 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) SOASuite 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
  4. 4. © OPITZ CONSULTING GmbH 2016 Slide 4Test-Driven SOA Suite 12c Upgrade Upgrade Process | Step-by-Step Overview 1. 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 INFRASTRUCTU RE SETUP CODE UPGRADE
  5. 5. © OPITZ CONSULTING GmbH 2016 Slide 5Test-Driven SOA Suite 12c Upgrade Upgrade Process | Step-by-Step – Preparation 1. 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
  6. 6. © 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 "outof 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 ofschemas and domains ü New deployment& configuration ofthe existing 11g projects ü Suitable in stateless & short-running scenarios ü Appropriate if the targeted sytem architecture should be diferentthan with 11g or if the current topology is not supported
  7. 7. © OPITZ CONSULTING GmbH 2016 Slide 7Test-Driven SOA Suite 12c Upgrade Upgrade Process | Step-by-Step - Infrastructure 4. 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
  8. 8. © 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 Managementfrom 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 developmentor evaluation distribution,see "Downloading Oracle Fusion Middleware 12c (12.2.1) DevelopmentDistributions“
  9. 9. © 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 ComponentConfigurations using the Upgrade Assistant(In-Place Upgrade)
  10. 10. © OPITZ CONSULTING GmbH 2016 Slide 10Test-Driven SOA Suite 12c Upgrade Upgrade Process | Step-by-Step - Code Upgrade 8. 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
  11. 11. © OPITZ CONSULTING GmbH 2016 Slide 11Test-Driven SOA Suite 12c Upgrade Upgrade Process | Step-by-Step - Code Upgrade 10. 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 relevanttest layers (Elementary UnitTests, ComponentTests,End-to- End Tests) ü We decided to build our own OC testing framework based on JUnitStandard and SOA Suite APIs to integrate it 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
  12. 12. © 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 essential n Ensure technical functionality and operational correctness n Improve code quality n Allow changes efficiently n Speed up development n Approaches n Manual testing n Oracle SOA Suite OOTB testing capabilities n OC SOA Testing Framework
  13. 13. © OPITZ CONSULTING GmbH 2016 Slide 13Test-Driven SOA Suite 12c Upgrade Test maturity n Status quo: Where we are and where we want to be Source: https://developer.ibm.com/urbancode/docs/continuous-delivery-maturity-model/ Desired state Usual state in Integration projects No tests
  14. 14. © OPITZ CONSULTING GmbH 2016 Slide 14Test-Driven SOA Suite 12c Upgrade Testing assets n Transformations n Xquery n XSLT n Custom Java functionalities n Java callouts n Custom XPath functions n Service implementations n JAX-WS/JAX-RS Webservices n SB services n SOA composites
  15. 15. © OPITZ CONSULTING GmbH 2016 Slide 15Test-Driven SOA Suite 12c Upgrade Testing areas OTM NAV Process Layer Service Layer (Facades) System Layer
  16. 16. © OPITZ CONSULTING GmbH 2016 Slide 16Test-Driven SOA Suite 12c Upgrade Elementary (Unit) tests of Transformations and custom Java functionalities CRM ERP Process Layer Service Layer (Facades) System Layer
  17. 17. © OPITZ CONSULTING GmbH 2016 Slide 17Test-Driven SOA Suite 12c Upgrade Service/Process component tests on local Dev Environments CRM ERP Process Layer Service Layer (Facades) System Layer Elementary Tests Elementary Tests Elementary Tests Mock MockMock MockMockMock
  18. 18. © OPITZ CONSULTING GmbH 2016 Slide 18Test-Driven SOA Suite 12c Upgrade CRM ERP Process Layer Service Layer (Facades) System Layer Process Tests Component Tests MockMockMock Service component tests on shared Test Environment
  19. 19. © OPITZ CONSULTING GmbH 2016 Slide 19Test-Driven SOA Suite 12c Upgrade CRM ERP Process Layer Service Layer (Facades) System Layer End-to-End Tests End-to-End Tests on Integration Environments
  20. 20. © 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-deploy Tests Post-deploy Tests Coverage Executiontime Complexity
  21. 21. © OPITZ CONSULTING GmbH 2016 Slide 21Test-Driven SOA Suite 12c Upgrade Oracle SOA OOTB testing capabilities n Design-time tests for transformations (XQuery, XSLT) n Design-time tests for Business rules n Test suites for SOA composites n Mocking of services/inbound messsages (Process initiation) at composite level n Mocking of references/outbound messages (Emulations) at composite level n Definition of XML assertions (Strict and similar) n Define tests for BPEL components on BPELactivity level n Variable and fault assertions n Bypass blocking activities like waits n Assert activity executions n No testing capability for Mediator, Human Task, BPMN
  22. 22. © OPITZ CONSULTING GmbH 2016 Slide 22Test-Driven SOA Suite 12c Upgrade OC SOA Testing Framework n 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
  23. 23. © OPITZ CONSULTING GmbH 2016 Slide 23Test-Driven SOA Suite 12c Upgrade Features n 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 pipeline configurations/properties) n Check execution of BPMN audit trail (activty execution, etc.)
  24. 24. © OPITZ CONSULTING GmbH 2016 Slide 24Test-Driven SOA Suite 12c Upgrade Comparison OOTB Testing vs. OC SOA Testing OOTB OC SOA Testing Test-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) ✔ ️ ✔ ️ ✔ ️
  25. 25. © OPITZ CONSULTING GmbH 2016 Slide 25Test-Driven SOA Suite 12c Upgrade Benefits n Test-Driven Development (TDD) n Common approach in Java/JEE development n Ensures that intended behavior is tested properly n Consistent testing approach n Flexibility n Extensibility Anti-Pattern
  26. 26. © OPITZ CONSULTING GmbH 2016 Slide 26Test-Driven SOA Suite 12c Upgrade OC SOA Testing – SOA composites Test Client SOA Server SAR SAR (origi nal) SAR (manipulate d) SAR (manipulate d) Download Composite Execute test Upload Composite SAR (original) SAR (original) Mock services Check
  27. 27. © OPITZ CONSULTING GmbH 2016 Slide 27Test-Driven SOA Suite 12c Upgrade OC SOA Testing – SB services Test Client SB Server SBAR Create Session Execute test SBAR (manipulate d) Manipulate Service Commit Session Rollback Changes SBAR Mock services Check
  28. 28. © OPITZ CONSULTING GmbH 2016 Slide 28Test-Driven SOA Suite 12c Upgrade Demo – VacationApplicationProcess VacationApplicationProcess VacationService
  29. 29. © OPITZ CONSULTING GmbH 2016 Slide 29Test-Driven SOA Suite 12c Upgrade Straight Forward ü Code upgrade with standard composites (using BPEL, Database and File adapters) à Testcases successfully 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 avoid Database 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 functions have 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
  30. 30. © 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 from patching cycles (reduce downtimes) ü Consider BAM Best Practices from the beginning
  31. 31. © OPITZ CONSULTING GmbH 2016 Slide 31Test-Driven SOA Suite 12c Upgrade Material § Presentation: What's Stopping You from Upgrading to Oracle SOASuite 12c? http://goo.gl/HGDIqF § Slideshare: Road to SOA Suite 12c http://de.slideshare.net/opitzconsulting/doag-2014-roadtosoasuite12cschmiedel § Video: 2 Minute Tech Tip https://blogs.oracle.com/archbeat/entry/2mtt § Troubleshooting the Upgrade http://docs.oracle.com/middleware/1213/core/FUPSS/know_base.htm#FUPSS339 § Oracle® Fusion Middleware Upgrading to the Oracle Fusion Middleware Infrastructure https://docs.oracle.com/middleware/1221/core/INFUP/toc.htm § Oracle® Fusion Middleware Upgrading SOASuite and Business Process Management https://docs.oracle.com/middleware/1221/core/FUPSS/toc.htm
  32. 32. © OPITZ CONSULTING GmbH 2016 Slide 32Test-Driven SOA Suite 12c Upgrade Q & A
  33. 33. © OPITZ CONSULTING GmbH 2016 Slide 33Test-Driven SOA Suite 12c Upgrade Contact Details Danilo Schmiedel Solution Architect| Oracle ACE Director OPITZ CONSULTING Deutschland GmbH Tempelhofer Weg 64, 12347 Berlin,Germany http://www.opitz-consulting.com Phone: +49 173 7279001 Mail: danilo.schmiedel@opitz-consulting.com @dschmied http://inside-bpm-and-soa.blogspot.com & http://thecattlecrew.net
  34. 34. © OPITZ CONSULTING GmbH 2016 Slide 34Test-Driven SOA Suite 12c Upgrade Contact Details Sven Bernhardt Solution Architect| Oracle ACE OPITZ CONSULTING Deutschland GmbH Kirchstrasse 6, 51647 Gummersbach,Germany http://www.opitz-consulting.com Phone: +49 172 2193529 Mail: sven.bernhardt@opitz-consulting.com @sbernhardt http://thecattlecrew.net

×