Test-Driven Cloud Development with Oracle SOA Cloud Service and Oracle Developer Cloud Service

Preview:

Citation preview

© OPITZ CONSULTING 2016

überraschend mehr Möglichkeiten!

© OPITZ CONSULTING 2016

Using Oracle SOA Cloud Service and Oracle Developer Cloud ServiceSven Bernhardt, Danilo Schmiedel

Test-Driven Cloud Development

© OPITZ CONSULTING 2016

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 Deployment Guide

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

Specialized in many products across the Oracle portfolio

2 Oracle ACE Directors and 2 Oracle ACEs

Recognized as one of the leading Oracle Fusion Middleware Partners

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

© OPITZ CONSULTING 2016 Seite 3

Agenda

12345

Why test-driven development?Oracle SOA CS and Oracle Developer CS Testing in (cloud) integration projects

OC Testframework

Benefits & Wrap up

Test-Driven Cloud Development

© OPITZ CONSULTING 2016 Seite 4

Why test-driven development? 1

Test-Driven Cloud Development

© OPITZ CONSULTING 2016 Test-Driven Cloud Development

Layout: Titel & 1 InhaltEinsatz: StandardfolieInhalt: Überschrift, variabler InhaltTipps: Bitte Überschrift 1zeilig; div. Inhaltstypen sind möglich

Seite 5

Case Study #1 - Simplified Solution Architecture

Webshop

ERP

Warehouses Carriers Suppliers

Integration Platform (SOA Suite)

Customer Service

© OPITZ CONSULTING 2016 Test-Driven Cloud Development

Layout: Titel & 1 InhaltEinsatz: StandardfolieInhalt: Überschrift, variabler InhaltTipps: Bitte Überschrift 1zeilig; div. Inhaltstypen sind möglich

Seite 6

Case Study #1 - Problem Cloud

Transparency

Technical Monitoring

Schema Validation

Handling of technical faults

Handling of business faultsHuman Intervention

Versioning

Re-usability

System Integration

Adapter

Different Protocols

ScalabilityContinuity

StandardizationTime-to-Market

© OPITZ CONSULTING 2016 Test-Driven Cloud Development

Layout: Titel & 1 InhaltEinsatz: StandardfolieInhalt: Überschrift, variabler InhaltTipps: Bitte Überschrift 1zeilig; div. Inhaltstypen sind möglich

Seite 7

Case Study #1 – Team Structure

ERP Team MW Team QA Team

5 People 9 People 6 People

© OPITZ CONSULTING 2016 Test-Driven Cloud Development

Layout: Titel & 1 InhaltEinsatz: StandardfolieInhalt: Überschrift, variabler InhaltTipps: Bitte Überschrift 1zeilig; div. Inhaltstypen sind möglich

Seite 8

2015 2016Jan Mrz Mai Jul Sep Nov 2016 Mrz Mai

GoLive: Foundation Components 1Feb 15, 2015

GoLive: Foundation Components 2Mrz 22, 2015

GoLive: Release 1Apr 12, 2015

GoLive: Release 2Mai 24, 2015

GoLive: Release 3Jul 19, 2015

GoLive: Release 4Dez 7, 2015

GoLive: Release 5Jan 20, 2016

GoLive: Release 6Apr 19, 2016

GoLive: Release 7Mai 3, 2016

Project Kick off (incl. Specification)Jan 5, 2015

Development of all Releases completedSep 18, 2015

40 days QA of Release 1

30 days QA of Release 2

40 days QA of Release 3

100 days QA of Release 4

32 days QA of Release 5

63 days QA of Release 6

9 days QA of Release 7

~ 8 month

© OPITZ CONSULTING 2016

Layout: Titel & 1 InhaltEinsatz: StandardfolieInhalt: Überschrift, variabler InhaltTipps: Bitte Überschrift 1zeilig; div. Inhaltstypen sind möglich

Test-Driven Cloud Development Seite 9

Waterfall development: Where we didn’t want to be! Static and cumbersome Insufficient test automation and no budget for DevOps Releases became too complex

Source: http://blog.procademysoftware.com/agile-project-management/

Source: http://www.commonplaces.com/blog/agile-vs-waterfall-how-to-approach-your-web-development-project/

© OPITZ CONSULTING 2016

Layout: Titel & 1 InhaltEinsatz: StandardfolieInhalt: Überschrift, variabler InhaltTipps: Bitte Überschrift 1zeilig; div. Inhaltstypen sind möglich

Test-Driven Cloud Development Seite 10

Agile development: Where we wanted to be! Target approach was agile Small, incremental deliverables In-time business value generation

Source: http://blog.procademysoftware.com/agile-project-management/

Source: http://www.commonplaces.com/blog/agile-vs-waterfall-how-to-approach-your-web-development-project/

© OPITZ CONSULTING 2016

Layout: Titel & 1 InhaltEinsatz: StandardfolieInhalt: Überschrift, variabler InhaltTipps: Bitte Überschrift 1zeilig; div. Inhaltstypen sind möglich

Test-Driven Cloud Development Seite 11

Test maturity Analysis of the status quo: Where we are and where we want to

be? Minimum Target Reality

No tests

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

© OPITZ CONSULTING 2016 Test-Driven Cloud Development

Layout: Titel & 1 InhaltEinsatz: StandardfolieInhalt: Überschrift, variabler InhaltTipps: Bitte Überschrift 1zeilig; div. Inhaltstypen sind möglich

Seite 12

Continuous integration / delivery

Source: https://guidelines.axonivy.com/projects/guides/wiki/Continuous_integration_delivery

Source: http://softwareengineeringdaily.com/tag/continuous-delivery/

© OPITZ CONSULTING 2016 Test-Driven Cloud Development

Layout: Titel & 1 InhaltEinsatz: StandardfolieInhalt: Überschrift, variabler InhaltTipps: Bitte Überschrift 1zeilig; div. Inhaltstypen sind möglich

Seite 13

Lessons Learned

„Never start a (cloud) integration project without an appropriate DevOps approach.“

But how to establish it efficiently?

© OPITZ CONSULTING 2016 Seite 14

Oracle SOA CS and ODCS 2

Test-Driven Cloud Development

© OPITZ CONSULTING 2016

Layout: Titel & 1 InhaltEinsatz: StandardfolieInhalt: Überschrift, variabler InhaltTipps: Bitte Überschrift 1zeilig; div. Inhaltstypen sind möglich

Test-Driven Cloud Development

Oracle Cloud Services

Source: https://cloud.oracle.com/developer/services

© OPITZ CONSULTING 2016

Layout: Titel & 1 InhaltEinsatz: StandardfolieInhalt: Überschrift, variabler InhaltTipps: Bitte Überschrift 1zeilig; div. Inhaltstypen sind möglich

Test-Driven Cloud Development

Oracle SOA Cloud Service (SOA CS) Full suite of developer tools

including OSB (Virtualization), BPEL (Orchestration), B2B, Managed File Transfer, Adapters for Connectivity, API Management

Oracle manages the infrastructure

Fully automated provisioning Provides complete access, so

that administrators can tune, configure, and monitor the SOA environment as with on-prem

© OPITZ CONSULTING 2016 Seite 17Test-Driven Cloud Development

Demo – SOA CS

© OPITZ CONSULTING 2016 Test-Driven Cloud Development

Layout: Titel & 1 InhaltEinsatz: StandardfolieInhalt: Überschrift, variabler InhaltTipps: Bitte Überschrift 1zeilig; div. Inhaltstypen sind möglich

Seite 18

Oracle Developer CS (ODCS) Complete development platform provided as a service to enable

an agile development process and to automate DevOps & delivery

Dev CS supports: Continuous Integration, Continuous Delivery and Collaboration

Is included as a free entitlement with trial and paid orders of Java Cloud Service, Java Cloud Service-SaaS Extension, Messaging Cloud Service, Mobile Cloud Service, SOA Cloud Service and Application Container Cloud

© OPITZ CONSULTING 2016 Test-Driven Cloud Development

Layout: Titel & 1 InhaltEinsatz: StandardfolieInhalt: Überschrift, variabler InhaltTipps: Bitte Überschrift 1zeilig; div. Inhaltstypen sind möglich

Seite 19

Developer CS – What‘s inside? Version Management - Git Build Automation Continuous Integration - Hudson Issue Tracking Code review Deployment automation Agile process management Wiki Activity Stream

© OPITZ CONSULTING 2016 Seite 20Test-Driven Cloud Development

Demo – Developer CS

© OPITZ CONSULTING 2016 Seite 21Test-Driven Cloud Development

Testing in (cloud) integration projects 3

Source: http://softwareengineeringdaily.com/tag/continuous-delivery/

© OPITZ CONSULTING 2016

Layout: Titel & 1 InhaltEinsatz: StandardfolieInhalt: Überschrift, variabler InhaltTipps: Bitte Überschrift 1zeilig; div. Inhaltstypen sind möglich

Test-Driven Cloud Development Seite 22

Challenges in integration projects Complexity Distribution of systems / services Wide range of different technologies & skills Multiple data sources Test automation Deployment automation Consistent monitoring (E2E)

© OPITZ CONSULTING 2016

Layout: Titel & 1 InhaltEinsatz: StandardfolieInhalt: Überschrift, variabler InhaltTipps: Bitte Überschrift 1zeilig; div. Inhaltstypen sind möglich

Test-Driven Cloud Development Seite 23

Testing assets in integration projects Transformations

XQuery XSLT NXSD

Java Java callouts Custom XPath functions JAX-WS / JAX-RS Web Services

Services / Processes Service Bus Services SOA Composites

© OPITZ CONSULTING 2016

Layout: Titel & 1 InhaltEinsatz: StandardfolieInhalt: Überschrift, variabler InhaltTipps: Bitte Überschrift 1zeilig; div. Inhaltstypen sind möglich

Test-Driven Cloud Development Seite 24

Testing areas

CRM ERP

Process Layer

Service Layer

(Facades)

System Layer

© OPITZ CONSULTING 2016

Layout: Titel & 1 InhaltEinsatz: StandardfolieInhalt: Überschrift, variabler InhaltTipps: Bitte Überschrift 1zeilig; div. Inhaltstypen sind möglich

Test-Driven Cloud Development Seite 25

Elementary (Unit) tests

CRM ERP

Process Layer

Service Layer

(Facades)

System Layer

© OPITZ CONSULTING 2016

Layout: Titel & 1 InhaltEinsatz: StandardfolieInhalt: Überschrift, variabler InhaltTipps: Bitte Überschrift 1zeilig; div. Inhaltstypen sind möglich

Test-Driven Cloud Development Seite 26

Service/Process component tests

CRM ERP

Process Layer

Service Layer

(Facades)

System Layer

Elementary Tests

Elementary Tests

Elementary Tests

Mock

Mock

Mock

Mock

Mock

Mock

© OPITZ CONSULTING 2016

Layout: Titel & 1 InhaltEinsatz: StandardfolieInhalt: Überschrift, variabler InhaltTipps: Bitte Überschrift 1zeilig; div. Inhaltstypen sind möglich

Test-Driven Cloud Development Seite 27

Service component tests

CRM ERP

Process Layer

Service Layer

(Facades)

System Layer

ProcessTests

ComponentTests

Mock

Mock

Mock

© OPITZ CONSULTING 2016

Layout: Titel & 1 InhaltEinsatz: StandardfolieInhalt: Überschrift, variabler InhaltTipps: Bitte Überschrift 1zeilig; div. Inhaltstypen sind möglich

Test-Driven Cloud Development Seite 28

Test layers in detail Elementary Unit Tests

What – Tests the atomic functionality of the implemented code Goal – Provide quality feedback for the developer in short and fast cycles Where – NAV and MW developer using mocks on Development environment

Component Tests What – Tests the integrative functionality of the implemented code Goal – Provide possibility to skip blocker and continue with next component Where – QA using SOAP UI tests on Test environment

End-to-End Test What – Tests the complete functionality of a process Goal – Assure that the process is running as defined by the requirements Where – QA using real applications for tests on Integration environment

© OPITZ CONSULTING 2016

Layout: Titel & 1 InhaltEinsatz: StandardfolieInhalt: Überschrift, variabler InhaltTipps: Bitte Überschrift 1zeilig; div. Inhaltstypen sind möglich

Test-Driven Cloud Development Seite 29

Overview types of tests

Load/Performance/Stability tests

E2E tests

Process component tests

Service component tests

Transformation tests (XQuery, XSLT)

Custom Java functionalitiesPre-deployTests

Post-deployTests

Cove

rage

Exec

utio

n tim

e

Com

plex

ity

© OPITZ CONSULTING 2016 Seite 30Test-Driven Cloud Development

OC Testframework 4

© OPITZ CONSULTING 2016

Layout: Titel & 1 InhaltEinsatz: StandardfolieInhalt: Überschrift, variabler InhaltTipps: Bitte Überschrift 1zeilig; div. Inhaltstypen sind möglich

Test-Driven Cloud Development Seite 31

Oracle SOA OOTB testing capabilities Design-time tests for transformations (XQuery, XSLT) Design-time tests for Business rules Test suites for SOA composites

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

Variable and fault assertions Bypass blocking activities like waits Assert activity executions

No testing capability for Mediator, Human Task, BPMN

© OPITZ CONSULTING 2016

Layout: Titel & 1 InhaltEinsatz: StandardfolieInhalt: Überschrift, variabler InhaltTipps: Bitte Überschrift 1zeilig; div. Inhaltstypen sind möglich

Test-Driven Cloud Development Seite 32

OC SOA Testing Framework Java-based framework Developed and enhanced in several projects Uses provided Oracle APIs Supports SB Service testing Supports integration testing for SB and SOA composites Consistent integration in CI environment Earns further maturity through usage in international projects Supports SOA Suite 11g, 12c and SOA CS

© OPITZ CONSULTING 2016

Layout: Titel & 1 InhaltEinsatz: StandardfolieInhalt: Überschrift, variabler InhaltTipps: Bitte Überschrift 1zeilig; div. Inhaltstypen sind möglich

Test-Driven Cloud Development Seite 33

Features Offline testing for XQuery, XSL and NXSD Validate XML requests and responses

Definition of Xpath assertions Definition of XML Equals assertions

Call SOA composite and SB services Manage SOA composite and SB services Intercept service calls Mock services (WS, all kind of JCA adapters, Human tasks) Manipulate runtime artifacts (DVMs, SB pipeline

configurations/properties) Specific functionality for BPMN process testing

© OPITZ CONSULTING 2016

Layout: Titel & 1 InhaltEinsatz: StandardfolieInhalt: Überschrift, variabler InhaltTipps: Bitte Überschrift 1zeilig; div. Inhaltstypen sind möglich

Test-Driven Cloud Development Seite 34

Comparison Oracle OOTB Testing and OC SOA Testing

OOTB OC SOA TestingTest-driven approach - ✔Test automation Composites only ✔Mocking ✔ ✔Support for test types

• UnitXSLT / XQuery design-time only

Composites ✔Service Bus –

• Isolation Composites only ✔• Integration Manual ✔

© OPITZ CONSULTING 2016

Layout: Titel & 1 InhaltEinsatz: StandardfolieInhalt: Überschrift, variabler InhaltTipps: Bitte Überschrift 1zeilig; div. Inhaltstypen sind möglich

Test-Driven Cloud Development Seite 35

Benefits Test-Driven Development (TDD)

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

Consistent testing approach Flexibility Extensibility

Anti-Pattern

© OPITZ CONSULTING 2016 Seite 36Test-Driven Cloud Development

Demo – OC Testframework

© OPITZ CONSULTING 2016

Layout: Titel & 1 InhaltEinsatz: StandardfolieInhalt: Überschrift, variabler InhaltTipps: Bitte Überschrift 1zeilig; div. Inhaltstypen sind möglich

Test-Driven Cloud Development Seite 37

Framework architecture Build upon Oracle SOA libraries Base class for test implementations

com.opitzconsulting.soa.testing.AbstractSoaTest Uses further Java libraries to simplify test development

XMLUnit (Validation of XML) Apache HTTP Client (Invocation of services)

© OPITZ CONSULTING 2016

Layout: Titel & 1 InhaltEinsatz: StandardfolieInhalt: Überschrift, variabler InhaltTipps: Bitte Überschrift 1zeilig; div. Inhaltstypen sind möglich

Test-Driven Cloud Development Seite 38

OC SOA Testing – SCA ServicesTest Client SOA Server

SARSAR

(original)

SAR (manipulate

d)SAR

(manipulated)

Download Composite

Execute test

Upload CompositeSAR

(original)

SAR (original)

Mock services

Check

© OPITZ CONSULTING 2016

Layout: Titel & 1 InhaltEinsatz: StandardfolieInhalt: Überschrift, variabler InhaltTipps: Bitte Überschrift 1zeilig; div. Inhaltstypen sind möglich

Test-Driven Cloud Development Seite 39

OC SOA Testing – SB ServicesTest Client SB Server

SBAR

Create Session

Execute test SBAR (manipulate

d)

Manipulate ServiceCommit Session

Rollback Changes SBAR

Mock services

Check

© OPITZ CONSULTING 2016

Layout: Titel & 1 InhaltEinsatz: StandardfolieInhalt: Überschrift, variabler InhaltTipps: Bitte Überschrift 1zeilig; div. Inhaltstypen sind möglich

Test-Driven Cloud Development Seite 40

Setup OC SOA Testing framework Create new project in DevCS (Initial repository) Adjust local Maven settings to use DevCS Maven repository Populate Maven repository

mvn deploy:deploy-file -DpomFile=oracle-maven-sync-12.1.3.pom -Dfile=oracle-maven-sync-12.1.3.jar -Durl=https://developer.us2.oraclecloud.com/profile/ developer88301-deoracleem99369/s/developer88301-deoracleem99369_soa-cloud-testing_10988/maven/ -DrepositoryId=odcs

mvn com.oracle.maven:oracle-maven-sync:push -Doracle-maven-sync.oracleHome=$MW_HOME -Doracle-maven-sync.serverId=odcs -P odcs

Add additional libraries needed by the OC SOA Testingframework

© OPITZ CONSULTING 2016 Test-Driven Cloud Development

Layout: Titel & 1 InhaltEinsatz: StandardfolieInhalt: Überschrift, variabler InhaltTipps: Bitte Überschrift 1zeilig; div. Inhaltstypen sind möglich

Seite 41

Setup OC SOA Testing framework Commit & push your code to DevCS Git repository Deploy your artifacts to SOA CS Define the Hudson build jobs that executes tests

Pre-deploy test (XQuery, Xsl, Nxsd) Post-deploy test (SOA composite tests, SB services)

Find a detailed description with the basic steps:https://community.oracle.com/community/cloud_computing/platform-as-a-service-paas/oracle-developer-cloud-service/blog/2015/11/05/soa-cloud-service-developer-cloud-service-integration

© OPITZ CONSULTING 2016 Seite 42Test-Driven Cloud Development

Benefits & Wrap up 5

© OPITZ CONSULTING 2016 Test-Driven Cloud Development

Layout: Titel & 1 InhaltEinsatz: StandardfolieInhalt: Überschrift, variabler InhaltTipps: Bitte Überschrift 1zeilig; div. Inhaltstypen sind möglich

Seite 43

Benefits Consistent, straight-forward testing approach

Enables DevOps for SOA CS Uses the same technologies for all implementation assests Supports the automation of the software development lifecycle

Considers all assets of an SOA CS integration project Scalability

Add new testing capabilties by adding additional environments Improve code quality Faster development cycles

Supports version upgrades and on-prem to cloud migrations covered by tests to validate the results

© OPITZ CONSULTING 2016 Test-Driven Cloud Development Seite 44?

Q & A

© OPITZ CONSULTING 2016

überraschend mehr Möglichkeiten!

Test-Driven Cloud Development

@OC_WIRE OPITZCONSULTING opitzconsultingWWW.OPITZ-CONSULTING.COM

Seite 45

In case of any questions, please contact us!

Referenten-foto 1 hierrein!Danilo SchmiedelManaging Consultant Solutions | Oracle ACE DirectorOPITZ CONSULTING Deutschland GmbHTempelhofer Weg 64, 12347 Berlin, GermanyPhone: +49 173 7279001Mail: danilo.schmiedel@opitz-consulting.com

@dschmied

http://inside-bpm-and-soa.blogspot.com

Referenten-foto 2 hierrein!Sven BernhardtSolution Architect | Oracle ACEOPITZ CONSULTING Deutschland GmbHKirchstrasse 6, 51647 Gummersbach, GermanyPhone: +49 172 2193529Mail: sven.bernhardt@opitz-consulting.com

@sbernhardt

https://svenbernhardt.wordpress.com

Recommended