Service Virtualization for Dummies ®
@Al_Wagner Technical Marketing Manager IBM Rational
[email protected]
ibm.co/servicevirtualization
© 2013 IBM Corporation © 2013 IBM Corporation
Accelerating Product and Service Innovation
SV4D Agenda What is Service Virtualization? The driving forces Escaping the past! Finding your way Putting it to work The ROI is real! The 10 things to remember!
2
© 2013 IBM Corporation
Accelerating Product and Service Innovation
Service Virtualization is… a method to emulate the behavior of specific components in heterogeneous component-based applications such as service-oriented architectures. used to provide software development and QA/testing teams access to dependent system components that are needed to exercise an application under test (AUT), but are unavailable or difficult-to-access for development and testing purposes.
3
© 2013 IBM Corporation
Accelerating Product and Service Innovation
Service Virtualization is… behavior - functionality and performance asimulating method to the emulate the behavior of specific components -inof select components within an application to enable heterogeneous component-based applications such asendto-end testing ofarchitectures. the application as a whole. service-oriented used to provide software development and QA/testing teams access to dependent system components that are needed to exercise an application under test (AUT), but are unavailable or difficult-to-access for development and testing purposes.
4
© 2013 IBM Corporation
Accelerating Product and Service Innovation
Service Virtualization enables you to create “virtual components” which… can simulate the behavior of an entire application or system during testing. can run on commodity hardware, private cloud, public cloud. allow each developer, tester to have their own test environment.
allow developers, testers to continue using their testing tools (Manual, Web performance, UI test automation).
5
© 2013 IBM Corporation
Accelerating Product and Service Innovation
Using “mocks”? “Mock” or ad-hoc stub
– A piece of code used to stand in for some other programming functionality. – A stub may simulate the behavior of existing code or be a temporary substitute for yet-to-be-developed code.
6
© 2013 IBM Corporation
Accelerating Product and Service Innovation
Using “mocks”? “Mock” or ad-hoc stub
– A piece of code used to stand in for some other programming functionality. – A stub may simulate the behavior of existing code or be a temporary substitute for yet-to-be-developed code. This approach is: • Labor intensive to write and maintain mocks. • Requires deep knowledge of both technology and the business logic to be emulated. • Requires changes to application configuration when switching to live services for testing. • Hard to share across the entire team. 7
© 2013 IBM Corporation
Accelerating Product and Service Innovation
SV4D Agenda What is Service Virtualization?
The driving forces Escaping the past! Finding your way Putting it to work The ROI is real The top 10 things to remember!
8
© 2013 IBM Corporation
Accelerating Product and Service Innovation
Complexity of today’s applications Multiple layers of technology
Multiple vendor platforms Complex transactions Complex dependencies Multiple stakeholders
9
© 2013 IBM Corporation
Accelerating Product and Service Innovation
Testing this complexity is hard! Application complexity is exploding: Mainframe (one interface) Client Server (a few interfaces) Web/SOA/Cloud apps (100’s of interfaces)
Development and Test teams are getting larger and more geographically dispersed.
Costs are escalating and quality is suffering. Waterfall models and serial projects are out, agile and continuous testing are in.
A new approach is required to keep up! 10
© 2013 IBM Corporation
Accelerating Product and Service Innovation
And yet, we still test the same way Do you know what’s under the surface?
11
© 2013 IBM Corporation
Accelerating Product and Service Innovation
SV4D Agenda What is Service Virtualization? The driving forces
Escaping the past! Finding your way Putting it to work The ROI is real! The top 10 things to remember!
12
© 2013 IBM Corporation
Accelerating Product and Service Innovation
Blockers of early end to end testing… “It is too expensive to setup a live message feed for test!”
“Can we begin testing before everything is available?”
13
“We’re still waiting for them to deploy!”
“The environment
refresh takes 3 weeks!!”
“The dev team hasn’t started work on it yet!”
© 2013 IBM Corporation
Accelerating Product and Service Innovation
Poll Question #1 What percentage of your time are you spending setting up, maintaining, and re-cycling test environments? 1. 0% to 20% 2. 21% to 30% 3. 31% to 40% 4. 41% to 50% 5. More than 50%
14
© 2013 IBM Corporation
Accelerating Product and Service Innovation
The transformation to Agile Write & deliver code
Nightly build(s) Compile, unit test, publish
Setup integration test environment
Developer Developer Developer Developer Developer Developer
Tester
“N” days to install & configure
“N” nightly builds are piling up 15
© 2013 IBM Corporation
Accelerating Product and Service Innovation
The transformation to Agile Write & deliver code
Nightly build(s)
Setup integration test environment
Compile, unit test, publish
Developer Developer Developer Developer Developer Developer
Tester
“N” days to install & configure
Iteration 1 Design, Code, Test Weeks 2 - 6
Iteration planning Week 7 Iteration 2 Design, Code, Test Weeks 8 -12
Integration test iteration #1
Iteration planning Week 1
“N” nightly builds are piling up 16
Integration test iteration #2
SVT prep
Integration Testing lags a step behind the code © 2013 IBM Corporation
Accelerating Product and Service Innovation
The transformation to Agile I just spent 2 weeks Write & deliver code
Nightly build(s)
setting this up & the build is no good??
Compile, unit test, publish
Setup integration test environment
Developer Developer Developer Developer Developer Developer
Tester
“N” days to install & configure
Iteration 1 Design, Code, Test Weeks 2 - 6
Iteration planning Week 7 Iteration 2 Design, Code, Test Weeks 8 -12
Integration test iteration #1
Iteration planning Week 1
“N” nightly builds are piling up 17
Integration test iteration #2
SVT prep
Integration Testing lags a step behind the code © 2013 IBM Corporation
Accelerating Product and Service Innovation
The transformation to Agile I just spent 2 weeks Write & deliver code
Nightly build(s)
setting this up & the build is no good??
Compile, unit test, publish
Setup integration test environment
Developer Developer Developer Developer Developer Developer
Tester
When agility stops at integration “N” days to install & configure testing, the entire
organization hits the wall Iteration 1 Design, Code, Test Weeks 2 - 6
Iteration planning Week 7 Iteration 2 Design, Code, Test Weeks 8 -12
Integration test iteration #1
Iteration planning Week 1
“N” nightly builds are piling up 18
Integration test iteration #2
SVT prep
Integration Testing lags a step behind the code © 2013 IBM Corporation
Accelerating Product and Service Innovation
Service Virtualization brings opportunities Challenges Quality Inadequate testing and test environments
Opportunities Drive testing earlier, discover defects early when they are cheaper to correct
Defect escapes
Automate testing that matters freeing up resources for other value add activities
Test data consistency
Improve resource governance and control
Cost Escalating labor costs
Reduce infrastructure required to develop and test applications
High cost of defect fixes
Increase resource flexibility and availability
Poor asset utilization
Improve asset utilization
Time To Market Long cycle times Availability of resources
Provide rapid delivery of services Allow testing when only portions of the final solution are available Increase levels of testing
19
© 2013 IBM Corporation
Accelerating Product and Service Innovation
SV4D Agenda What is Service Virtualization? The driving forces Escaping the past!
Finding your way Putting it to work The ROI is real! The top 10 things to remember!
20
© 2013 IBM Corporation
Accelerating Product and Service Innovation
Poll Question #2 How does your organization deal with testing bottlenecks due to unavailable or missing software and services? 1. Manually write simulation stubs to emulate missing functionality. 2. Use commercial service virtualization solution. 3. Defer testing until later when the code is available to test. 4. De-scope testing of that functionality. 5. None of the above.
21
© 2013 IBM Corporation
Accelerating Product and Service Innovation
Discovering what to virtualize Technology
Component
Impact of Unavailable
Complexity Score
Protocol and message format
Component name
Dollar cost of impact
Scaling factor (1-10, low – high)
Web Service Soap over http
Credit Check Service
$10,000
2
Web Service Soap over http
Payment Service
$60,000
2
SAP
Journal Entry
$100,000
6
Examples:
22
© 2013 IBM Corporation
Accelerating Product and Service Innovation
Virtualizing the “real” behavior
23
Category
Detail
Simple
Hard-coded response returned for given input
Non-deterministic
One-of-n hard-coded responses
Data driven
Input and/or output data specified in external data source (Excel, file, database)
Data model, stateful
Input and/or output data kept in data model with complex relationships. Supports CRUD and other stateful behavior
Behavioral
Extends model-driven to provide pre-packaged functionality, e.g. shopping basket, real-time data feed, trading exchange, order matching © 2013 IBM Corporation
Accelerating Product and Service Innovation
Listen and capture the behavior Physical Test Environment Listen / Capture
Maintenance Constraints Server/ Web Services
2hr. access window Mainframe / MQ/CICS System Under Test
Store Volume Constraints Capture & Model
Smart Device / SD-IO
Web Services Test Case Repository
MQ/CICS Volume Constraints Smart Devices
Database / JDBC
JDBC 24
Virtual Environment
© 2013 IBM Corporation
Accelerating Product and Service Innovation
Build virtual components from design specs
Turn specifications into virtual components
HelloService
25
© 2013 IBM Corporation
Accelerating Product and Service Innovation
SV4D Agenda What is Service Virtualization? The driving forces Escaping the past! Finding your way
Putting it to work The ROI is real! The top 10 things to remember!
26
© 2013 IBM Corporation
Accelerating Product and Service Innovation
The old world without Service Virtualization Requirements
Big Bang Unit Tests Sys Tests UAT OT Performance
27
© 2013 IBM Corporation
Accelerating Product and Service Innovation
The oldworld worldwith without Service Virtualization A new Service Virtualization • Accelerates testing • Reduces costs • Lowers risk
Requirements Unit Tests Integration Tests
Sys Tests UAT OT
Performance
Shift testing to the left! 28
© 2013 IBM Corporation
Accelerating Product and Service Innovation
Continuously test at every layer
29
© 2013 IBM Corporation
Accelerating Product and Service Innovation
Incremental integration testing example C1 Test my own piece
Real
C2
C3
ERP
WSDL
V
V
3rd party
Database
V
Pass/Fail
• Test C1 with three virtualized services. • Quick to setup and low-cost. • Author integration tests early
30
© 2013 IBM Corporation
Accelerating Product and Service Innovation
Incremental integration testing example Time
31
C1
C2
C3
3rd party
Database
Pass/Fail
ERP
WSDL
V
V
V
Test my own piece
Real
Integrate w/another
Real
R
V
V
V
This won’t slow me down!
Real
V
V
V
V
First Complete System Test
Real
V
V
V
V
V
V
All components Integrated!
Real
R
R
V
V
V
V
© 2013 IBM Corporation
Accelerating Product and Service Innovation
Incremental integration testing example Time
C1
C2
C3
3rd party
Database
Pass/Fail
ERP
WSDL
V
V
V
Test my own piece
Real
Integrate w/another
Real
R
V
V
V
This won’t slow me down!
Real
V
V
V
V
First Complete System Test
Real
V
V
V
V
V
V
All components – Integrated!
Real
R
R
V
V
V
V
The expensive backend
Real
R
R
R
R
V
V
All Systems UP!
Real
R
R
R
R
R
R
32
© 2013 IBM Corporation
Accelerating Product and Service Innovation
Incremental integration testing example Time Test my own piece Integrate w/another This won’t slow me down! First Complete System Test All components – Integrated! The expensive backend All Systems UP!
33
C1
Real
C2
C3
ERP
WSDL
V
V
3rd party
Database
• Gradually integrate with expensive Real R V backend systems. V • Minimize use of backend systems for Real V V V testing purposes Real V V V V V • Process offers easy and cost effective Real R V V V defectR isolation • Integration tests are Real R R R written R and V executed earlier Real R R R R R
Pass/Fail
V
V
V
V
V
V
R
© 2013 IBM Corporation
Accelerating Product and Service Innovation
Service Virtualization across the SDLC Developer uses virtual services to unit test code on their workstation – no elaborate environment required Define constrained systems and services for virtualization
Unit
Integration
Development and Test teams uses virtual services for early stage advanced testing
System
System Integration
Operability Operability
Performance
The full system or components of the system can be performance tested early in the cycle. Virtual services can be used when components are not available
34
User Acceptance
Later in the cycle, final preproduction versions of services are swapped in as they become available. Final testing is done against real services
© 2013 IBM Corporation
Accelerating Product and Service Innovation
Continuous testing with service virtualization
Avoid testing bottlenecks due to dependencies on external services IBM Rational Test Workbench
SIT
FVT
Application changes being tested
IBM UrbanCode Deploy RTW plugin
Deploy Application
Test Virtualization Server plugin
• • •
Automate setup and management of test virtualization server in the cloud Automates configuration of virtualized services for an application under test Automate setup of production-like test environments with low cost
Databases
Mainframe applications
Third-party Services
virtualized services
IBM Rational Test Virtualization Server 35
© 2013 IBM Corporation
Accelerating Product and Service Innovation
SV4D Agenda What is Service Virtualization? The driving forces Escaping the past! Finding your way Putting it to work
The ROI is real! The top 10 things to remember!
36
© 2013 IBM Corporation
Accelerating Product and Service Innovation
Service Virtualization delivers real ROI! Decreases hardware costs • Virtual components run on commodity hardware • No need to stand up complete test environments using expensive hardware
Decreases labor costs • Test earlier and continuously • Avoid the test crunch and need to scale up test teams
Improves defect removal efficiency (DRE) • Isolate defects faster for earlier resolution • Decrease cost of resolving defects
37
© 2013 IBM Corporation
Accelerating Product and Service Innovation
Forrester Total Economic Impact Study A major European bank implemented service virtualization and automated integration testing as part of an Agile transformation to enable continuous testing. As a result of IBM capabilities, their system integration test (SIT) process was reduced from 3 weeks down to four hours!
The Total Economic Impact™ of IBM Rational Service Virtualization and Test Automation Solutions, a July 2013 commissioned study conducted by Forrester Consulting on behalf of IBM
3 Year Benefits:
38
•
Increased project delivery capacity 100% (40 projects to 80 projects)
•
Avoided hiring three additional FTE's, saving almost $600k.
•
Reduced incidents found in production from 2.5 to .3 per project, saving $3 million
•
Identified defects earlier and freed the team up to focus on new capabilities, saving over $560k
•
Reduced consulting and third party testing fees with better test automation, saving $408k
•
Eliminated the need for additional hardware and labor to set up test environments, saving $700k
•
Generated new revenue for the business – estimated at tens of millions! © 2013 IBM Corporation
Accelerating Product and Service Innovation
SV4D Agenda What is Service Virtualization? The driving forces Escaping the past! Finding your way Putting it to work The ROI is real!
The top 10 things to remember!
39
© 2013 IBM Corporation
Accelerating Product and Service Innovation
The top 10 things to remember! 1. Rethink your approach to testing – Your goal is to accelerate testing – manual or automated – in a way that is repeatable and increases efficiency
2. Plan for flexibility – Address biggest pain points first – as priorities shift over time, revisit and adjust!
3. Practice controlled integration – Introduce the real implementations incrementally
4. Test Continuously from development to production – Developers and Testers working in sync getting to done done done in a single iteration
5. Externalize your test data – Decouple your test data from virtual components for additional flexibility
40
© 2013 IBM Corporation
Accelerating Product and Service Innovation
The top 10 things to remember! 6. Explore advanced test scenarios – You can execute performance and negative tests much earlier.
7. Avoid reinventing the wheel – Don’t waste time and money writing “mocks” – use a supported solution and increase team productivity
8. Service Virtualization isn’t just for Testers – Service virtualization is the enabler allowing development to move beyond compilation testing and test integrations much earlier
9. Share virtual components across the enterprise – Service virtualization can change the way you test across your organization
10.Enhance team productivity by building skills – Putting the right amount of effort in training will pay off in dividends 41
© 2013 IBM Corporation
Accelerating Product and Service Innovation
Get your copy of “Service Virtualization for Dummies” today!
ibm.co/ServiceVirtualizationForDummies 42
© 2013 IBM Corporation
Accelerating Product and Service Innovation
ibm.co/servicevirtualization
© 2013 IBM Corporation
Accelerating Product and Service Innovation
ibm.co/servicevirtualization
© Copyright IBM Corporation 2013. All rights reserved. The information contained in these materials is provided for informational purposes only, and is provided AS IS without warranty of any kind, express or implied. IBM shall not be responsible for any damages arising out of the use of, or otherwise related to, these materials. Nothing contained in these materials is intended to, nor shall have the effect of, creating any warranties or representations from IBM or its suppliers or licensors, or altering the terms and conditions of the applicable license agreement governing the use of IBM software. References in these materials to IBM products, programs, or services do not imply that they will be available in all countries in which IBM operates. Product release dates and/or capabilities referenced in these materials may change at any time at IBM’s sole discretion based on market opportunities or other factors, and are not intended to be a commitment to future product or feature availability in any way. IBM, the IBM logo, Rational, the Rational logo, and other IBM products and services are trademarks of the International Business Machines Corporation, in the United States, other countries or both. Other company, product, or service names may be trademarks or service marks of others. © 2013 IBM Corporation