Mais conteúdo relacionado Semelhante a Improve your Cloud Integrations with Test-driven Development (20) Mais de OPITZ CONSULTING Deutschland (20) Improve your Cloud Integrations with Test-driven Development 1. © OPITZ CONSULTING 2017
¢¢¢ überraschend mehr Möglichkeiten!
© OPITZ CONSULTING 2017
Sven Bernhardt, Danilo Schmiedel
Improve your Cloud
Integrations with
Test-driven Development
2. © OPITZ CONSULTING 2017 API Management and why it matters Seite 2
OPITZ CONSULTING - A success story since 1990
¢ Mission: Help organizations leverage the possibilities of digitalization to be
different, better and faster than their competitors
¢ Owner-Managed company with
¢ 400+ consultants at 11 locations in DE and PL
¢ Revenue 2016: 47 Mill. €
Danilo Schmiedel
¢
¢ Managing Consultant
¢ Lead for Competence Center Cloud
About us
Sven Bernhardt
¢ Solution Architect
¢ Technical Lead for API Management
3. © OPITZ CONSULTING 2017 Seite 3
Agenda
1
2
3
4
5
Why test-driven development?
Oracle SOA CS and Oracle Developer CS
Testing in (cloud) integration projects
OC Testframework
Benefits & Wrap up
Improve your Cloud Integrations
4. © OPITZ CONSULTING 2017 Seite 4
Why test-driven development?
1
Improve your Cloud Integrations
5. © OPITZ CONSULTING 2017 Improve your Cloud Integrations Seite 5
Case Study - Simplified Solution Architecture
Webshop
ERP
Warehouses Carriers Suppliers
Integration Platform (SOA Suite)
Customer Service
6. © OPITZ CONSULTING 2017 Improve your Cloud Integrations Seite 6
Case Study - 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
7. © OPITZ CONSULTING 2017 Improve your Cloud Integrations Seite 7
Case Study – Team Structure
ERP Team MW Team QA Team
5 People 9 People 6 People
8. © OPITZ CONSULTING 2017 Improve your Cloud Integrations Seite 8
2015 2016Jan Mrz Mai Jul Sep Nov 2016 Mrz Mai
GoLive: Foundation Components 1
Feb 15, 2015
GoLive: Foundation Components 2
Mrz 22, 2015
GoLive: Release 1
Apr 12, 2015
GoLive: Release 2
Mai 24, 2015
GoLive: Release 3
Jul 19, 2015
GoLive: Release 4
Dez 7, 2015
GoLive: Release 5
Jan 20, 2016
GoLive: Release 6
Apr 19, 2016
GoLive: Release 7
Mai 3, 2016
Project Kick off (incl. Specification)
Jan 5, 2015
Development of all Releases completed
Sep 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
9. © OPITZ CONSULTING 2017 Improve your Cloud Integrations 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/
10. © OPITZ CONSULTING 2017 Improve your Cloud Integrations 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/
11. © OPITZ CONSULTING 2017 Improve your Cloud Integrations Seite 11
Test maturity
¢ Analysis of the status quo: Where we are and where we want to be?
Minimum TargetReality
No tests
Source: https://developer.ibm.com/urbancode/docs/continuous-delivery-maturity-
model/
12. © OPITZ CONSULTING 2017 Improve your Cloud Integrations Seite 12
Continuous integration / delivery
Source:
https://guidelines.axonivy.com/projects/guides/wiki/Co
ntinuous_integration_delivery
Source: http://softwareengineeringdaily.com/tag/continuous-
delivery/
13. © OPITZ CONSULTING 2017 Improve your Cloud Integrations Seite 13
Lessons Learned
„Never start a (cloud) integration project
without an appropriate DevOps approach.“
But how to establish it efficiently?
14. © OPITZ CONSULTING 2017 Seite 14
Oracle SOA CS and ODCS
2
Improve your Cloud Integrations
15. © OPITZ CONSULTING 2017 Improve your Cloud Integrations
Oracle Cloud Services
Source: https://cloud.oracle.com/developer/services
16. © OPITZ CONSULTING 2017 Improve your Cloud Integrations
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
18. © OPITZ CONSULTING 2017 Improve your Cloud Integrations 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
19. © OPITZ CONSULTING 2017 Improve your Cloud Integrations 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
21. © OPITZ CONSULTING 2017 Seite 21
Testing in (cloud) integration projects
3
Improve your Cloud Integrations
Source: http://softwareengineeringdaily.com/tag/continuous-
delivery/
22. © OPITZ CONSULTING 2017 Improve your Cloud Integrations 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)
23. © OPITZ CONSULTING 2017 Improve your Cloud Integrations 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
24. © OPITZ CONSULTING 2017 Improve your Cloud Integrations Seite 24
Testing areas
CRM ERP
Process
Layer
Service
Layer
(Facades)
System
Layer
25. © OPITZ CONSULTING 2017 Improve your Cloud Integrations Seite 25
Elementary (Unit) tests
CRM ERP
Process
Layer
Service
Layer
(Facades)
System
Layer
26. © OPITZ CONSULTING 2017 Improve your Cloud Integrations Seite 26
Service/Process component tests
CRM ERP
Process
Layer
Service
Layer
(Facades)
System
Layer
Elementary
Tests
Elementary
Tests
Elementary
Tests
Mock MockMock
MockMockMock
27. © OPITZ CONSULTING 2017 Improve your Cloud Integrations Seite 27
Service component tests
CRM ERP
Process
Layer
Service
Layer
(Facades)
System
Layer
Process
Tests
Component
Tests
MockMockMock
28. © OPITZ CONSULTING 2017 Improve your Cloud Integrations 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
29. © OPITZ CONSULTING 2017 Improve your Cloud Integrations Seite 29
Overview 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
31. © OPITZ CONSULTING 2017 Improve your Cloud Integrations 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
32. © OPITZ CONSULTING 2017 Improve your Cloud Integrations 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
33. © OPITZ CONSULTING 2017 Improve your Cloud Integrations 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
34. © OPITZ CONSULTING 2017 Improve your Cloud Integrations Seite 34
Comparison Oracle OOTB Testing and OC SOA Testing
OOTB OC SOA Testing
Test-driven approach - ✔
Test automation Composites only ✔
Mocking ✔ ✔
Support for test types
• Unit
XSLT / XQuery design-time only
Composites ✔
Service Bus –
✔
• Isolation Composites only ✔
• Integration Manual ✔
35. © OPITZ CONSULTING 2017 Improve your Cloud Integrations 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
36. © OPITZ CONSULTING 2017 Seite 36
Demo – OC Testframework
Improve your Cloud Integrations
37. © OPITZ CONSULTING 2017 Improve your Cloud Integrations 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)
38. © OPITZ CONSULTING 2017 Improve your Cloud Integrations Seite 38
OC SOA Testing – SCA Services
Test Client SOA Server
SAR
SAR
(original)
SAR
(manipulated)
SAR
(manipulated)
Download Composite
Execute test
Upload Composite
SAR (original)
SAR (original)
Mock services
Check
39. © OPITZ CONSULTING 2017 Improve your Cloud Integrations Seite 39
OC SOA Testing – SB Services
Test Client SB Server
SBAR
Create Session
Execute test SBAR
(manipulated)
Manipulate Service
Commit Session
Rollback Changes SBAR
Mock services
Check
40. © OPITZ CONSULTING 2017 Improve your Cloud Integrations 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
41. © OPITZ CONSULTING 2017 Improve your Cloud Integrations 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
43. © OPITZ CONSULTING 2017 Improve your Cloud Integrations 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
44. © OPITZ CONSULTING 2017 API Management and why it matters
We’re the engine of digital transformation
Seite 44
46. © OPITZ CONSULTING 2017
¢¢¢ überraschend mehr Möglichkeiten!
@OC_WIRE OPITZCONSULTING opitzconsultingWWW.OPITZ-CONSULTING.COM
Seite 46
In case of any questions, please
contact us!
Danilo Schmiedel
Managing Consultant Solutions | Oracle ACE Director
OPITZ CONSULTING Deutschland GmbH
Tempelhofer Weg 64, 12347 Berlin, Germany
Phone: +49 173 7279001
Mail: danilo.schmiedel@opitz-consulting.com
@dschmied
http://inside-bpm-and-soa.blogspot.com
Sven Bernhardt
Solution Architect | Oracle ACE
OPITZ CONSULTING Deutschland GmbH
Kirchstrasse 6, 51647 Gummersbach, Germany
Phone: +49 172 2193529
Mail: sven.bernhardt@opitz-consulting.com
@sbernhardt
https://svenbernhardt.wordpress.com
Improve your Cloud Integrations