Upload
sven-bernhardt
View
646
Download
2
Embed Size (px)
Citation preview
© OPITZ CONSULTING GmbH 2016 Slide 1Test-Driven Cloud Development
September 2016
Test-Driven Cloud Development
Danilo SchmiedelSolution Architect | Oracle ACE DirectorOPITZ CONSULTING Deutschland GmbH
Sven BernhardtSolution Architect | Oracle ACEOPITZ CONSULTING Deutschland GmbH
Using Oracle SOA Cloud Service and Oracle Developer Cloud Service
© OPITZ CONSULTING GmbH 2016 Slide 2Test-Driven Cloud Development
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
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
© OPITZ CONSULTING GmbH 2016 Slide 3Test-Driven Cloud Development
Agenda1. Why test-driven development?
2. Oracle SOA CS and Oracle Developer CS
3. Testing in (cloud) integration projects
4. OC Testframework
5. Demo
6. Benefits
© OPITZ CONSULTING GmbH 2016 Slide 4Test-Driven Cloud Development
1 Why test-driven development?
© OPITZ CONSULTING GmbH 2016 Slide 5Test-Driven Cloud Development
Case Study #1 - Simplified Solution Architecture
Webshop
ERP
Warehouses Carriers Suppliers
Integration Platform (SOA Suite)
Customer Service
© OPITZ CONSULTING GmbH 2016 Slide 6Test-Driven Cloud Development
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
Standardization
Time-to-Market
© OPITZ CONSULTING GmbH 2016 Slide 7Test-Driven Cloud Development
Case Study #1 – Team Structure
ERP Team MW Team QA Team
5 People 9 People 6 People
© OPITZ CONSULTING GmbH 2016 Slide 8Test-Driven Cloud Development
2015 2016Jan Mrz Mai Jul Sep Nov 2016 Mrz Mai
GoLive:FoundationComponents1Feb15,2015
GoLive:FoundationComponents2Mrz22,2015
GoLive:Release1Apr12,2015
GoLive:Release2Mai24,2015
GoLive:Release3Jul19,2015
GoLive:Release4Dez7,2015
GoLive:Release5Jan20,2016
GoLive:Release6Apr19,2016
GoLive:Release7Mai3,2016
ProjectKickoff(incl.Specification)Jan5,2015
DevelopmentofallReleasescompletedSep18,2015
40days QAofRelease1
30days QAofRelease2
40days QAofRelease3
100days QAofRelease4
32days QAofRelease5
63days QAofRelease6
9days QAofRelease7
~8month
© OPITZ CONSULTING GmbH 2016 Slide 9Test-Driven Cloud Development
Case Study #1 – Project Approach (Target)n Target approach was agile
n Small, incremental deliverables
n 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 GmbH 2016 Slide 10Test-Driven Cloud Development
Case Study #1 – Project Approach (Reality) n Static and cumbersome
n Insufficient test automation and no budget for DevOps
n 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 GmbH 2016 Slide 11Test-Driven Cloud Development
Test maturityn Analysis of the status quo: Where we are and where we want to be?
Source: https://developer.ibm.com/urbancode/docs/continuous-delivery-maturity-model/
Minimum Target Reality
No tests
© OPITZ CONSULTING GmbH 2016 Slide 12Test-Driven Cloud Development
Continuous integration / delivery
Source: https://guidelines.axonivy.com/projects/guides/wiki/Continuous_integration_delivery
Source: http://softwareengineeringdaily.com/tag/continuous-delivery/
© OPITZ CONSULTING GmbH 2016 Slide 13Test-Driven Cloud Development
„ “Never start a (cloud) integration projectwithout an appropriate DevOps approach.
But how to establish it efficiently?
© OPITZ CONSULTING GmbH 2016 Slide 14Test-Driven Cloud Development
2 Oracle SOA CS and Oracle Developer CS
© OPITZ CONSULTING GmbH 2016 Slide 15Test-Driven Cloud Development
Oracle Cloud Services
Source: https://cloud.oracle.com/developer/services
© OPITZ CONSULTING GmbH 2016 Slide 16Test-Driven Cloud Development
Oracle SOA CSn Full suite of developer tools
including OSB (Virtualization), BPEL (Orchestration), B2B, Managed File Transfer, Adapters for Connectivity, API Management
n Oracle manages the infrastructure
n Fully automated provisioning
n Provides complete access, so that administrators can tune, configure, and monitor the SOA environment as with on-prem
© OPITZ CONSULTING GmbH 2016 Slide 17Test-Driven Cloud Development
Oracle Developer CSn Complete development platform provided as a service to enable
an agile development process and to automate DevOps & delivery
n Dev CS supports: Continuous Integration, Continuous Delivery and Collaboration
n Is included as a free entitlement with trial and paid orders of n Java Cloud Service, n Java Cloud Service-SaaS Extension, n Messaging Cloud Service, n Mobile Cloud Service, n SOA Cloud Service and n Application Container Cloud
© OPITZ CONSULTING GmbH 2016 Slide 18Test-Driven Cloud Development
Developer CS – What‘s inside? n Version Management - Gitn Build Automation
n Ant, Maven, Gradle, npm, Grunt, Bower, Gulp, Command line
n Continuous Integration - Hudsonn Issue Trackingn Code reviewn Deployment automationn Agile process managementn Wikin Activity Stream
© OPITZ CONSULTING GmbH 2016 Slide 19Test-Driven Cloud Development
3 Testing in (cloud) integration projects
Source: http://softwareengineeringdaily.com/tag/continuous-delivery/
© OPITZ CONSULTING GmbH 2016 Slide 20Test-Driven Cloud Development
Challenges in (cloud) integration projectsn Complexity
n Distribution of systems / services
n Wide range of different technologies & skills
n Multiple data sources
n Test automation
n Deployment automation
n Consistent monitoring (E2E)
© OPITZ CONSULTING GmbH 2016 Slide 21Test-Driven Cloud Development
Testing assets in SOA CS n Transformations
n XQueryn XSLTn NXSD
n Javan Java calloutsn Custom XPath functionsn JAX-WS / JAX-RS Web Services
n Services / Processesn Service Bus Servicesn SOA Composites
© OPITZ CONSULTING GmbH 2016 Slide 22Test-Driven Cloud Development
Testing areas
CRM ERP
ProcessLayer
Service Layer
(Facades)
System Layer
© OPITZ CONSULTING GmbH 2016 Slide 23Test-Driven Cloud Development
Elementary (Unit) tests of transformations and custom Java functionalities
CRM ERP
ProcessLayer
Service Layer
(Facades)
System Layer
© OPITZ CONSULTING GmbH 2016 Slide 24Test-Driven Cloud Development
Service/Process component tests on local Dev Environments
CRM ERP
ProcessLayer
Service Layer
(Facades)
System Layer
ElementaryTests
ElementaryTests
ElementaryTests
Mock MockMock
MockMockMock
© OPITZ CONSULTING GmbH 2016 Slide 25Test-Driven Cloud Development
CRM ERP
ProcessLayer
Service Layer
(Facades)
System Layer
ProcessTests
ComponentTests
MockMockMock
Service component tests on shared Test Environment
© OPITZ CONSULTING GmbH 2016 Slide 26Test-Driven Cloud Development
CRM ERP
ProcessLayer
Service Layer
(Facades)
System Layer
End-to-EndTests
End-to-End Tests on Integration Environments
© OPITZ CONSULTING GmbH 2016 Slide 27Test-Driven Cloud Development
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
© OPITZ CONSULTING GmbH 2016 Slide 28Test-Driven Cloud Development
4 OC Testframework
© OPITZ CONSULTING GmbH 2016 Slide 29Test-Driven Cloud Development
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
© OPITZ CONSULTING GmbH 2016 Slide 30Test-Driven Cloud Development
OC SOA Testing Frameworkn Java-based framework
n Developed and enhanced in several projects
n Uses provided Oracle APIs
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
n Supports SOA Suite 11g and 12c
© OPITZ CONSULTING GmbH 2016 Slide 31Test-Driven Cloud Development
Featuresn Execute XQuery, Xsl and Nxsd 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.)
© OPITZ CONSULTING GmbH 2016 Slide 32Test-Driven Cloud Development
Comparison OOTB Testing vs. OC SOA TestingOOTB OC SOA Testing
Test-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 GmbH 2016 Slide 33Test-Driven Cloud Development
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
© OPITZ CONSULTING GmbH 2016 Slide 34Test-Driven Cloud Development
OC SOA Testing – SOA CompositesTest Client SOA Server
SAR
SAR (original)
SAR (manipulated)
SAR (manipulated)
Download Composite
Execute test
Upload Composite SAR (original)
SAR (original)
Mock services
Check
© OPITZ CONSULTING GmbH 2016 Slide 35Test-Driven Cloud Development
OC SOA Testing – SB ServicesTest Client SB Server
SBAR
Create Session
Execute test SBAR (manipulated)
Manipulate Service
Commit Session
Rollback Changes SBAR
Mock services
Check
© OPITZ CONSULTING GmbH 2016 Slide 36Test-Driven Cloud Development
5 Demo
© OPITZ CONSULTING GmbH 2016 Slide 37Test-Driven Cloud Development
Setup 1/2n Create new project in DevCS (Initial repository)
n Adjust local Maven settings to use DevCS Maven repository
n Populate Maven repositoryn 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
n mvn com.oracle.maven:oracle-maven-sync:push -Doracle-maven-sync.oracleHome=$MW_HOME -Doracle-maven-sync.serverId=odcs -P odcs
n Add additional libraries needed by the OC SOA Testingframework
© OPITZ CONSULTING GmbH 2016 Slide 38Test-Driven Cloud Development
Setup 2/2n Commit & push your code to DevCS Git repository
n Deploy your artifacts to SOA CS
n Define the Hudson build jobs that executes testsn Pre-deploy test (XQuery, Xsl, Nxsd)n Post-deploy test (SOA composite tests, SB services)
n 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 GmbH 2016 Slide 39Test-Driven Cloud Development
5 Benefits
© OPITZ CONSULTING GmbH 2016 Slide 40Test-Driven Cloud Development
Benefitsn Consistent, straight-forward testing approach
n Enables DevOps for SOA CSn Uses the same technologies for all implementation assestsn Supports the automation of the software development lifecycle
n Considers all assets of an SOA CS integration projectn Scalability
n Add new testing capabilties by adding additional environmentsn Improve code qualityn Faster development cycles
n Supports version upgrades and on-prem to cloud migrationscovered by tests to validate the results
© OPITZ CONSULTING GmbH 2016 Slide 41Test-Driven Cloud Development
Q & A
© OPITZ CONSULTING GmbH 2016 Slide 42Test-Driven Cloud Development
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
© OPITZ CONSULTING GmbH 2016 Slide 43Test-Driven Cloud Development
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
https://svenbernhardt.wordpress.com & http://thecattlecrew.net