Regression Testing
Software Quality Webcast
Monica Luke [email protected] IBM Software, Rational April 2013
2006 IBM Corporation 1
IBM Software
Agenda
What & why of Regression testing Leveraging Automation
Managing the regression suite
Maximizing your team
IBM Software
Innovation is being driven by software
Mobile banking will be the most widely used banking channel by 2020, if not sooner
Will it perform?
The average 2010 automobile contains more lines of software code than a fighter jet
Are we compliant?
Is it secure?
Source: Mobile banking: A catalyst for improving bank performance, Deloitte, 2010; and This Car Runs on Code, Robert Charette, IEEE Spectrum, 2009. 3
IBM Software
Software quality is a major problem across all industries
Software is blamed for more major business problems than any other man-made product. Poor software quality has become one of the most expensive topics in human history
$150+ billion per year in U.S. $500+ billion per year worldwide.
Projects cancelled due to poor quality are 15% more costly than successful projects of the same size and type.
Source: Capers Jones, 2011 Based on 675 companies, 35 government/military groups, 13,500 projects, 50-75 new projects/month, 24 countries, 15 lawsuits
4
IBM Software
Regression Testing
The objective of a test is to find defects
New features or software are typically buggy. We want to shake that out
The objective of a regression test is to NOT find defects
Validate that the software is the same as the previous release, build, milestone
Regression testing results are an important tool in determining software quality
IBM Software
One way to not find defects is to not run any regression tests
IBM Software
Does it work as expected?
Regression testing defines application stability
It performs as it has in the past All the changes did not introduce failures in things that used to work
It greatly impacts the perception of quality
Patch releases require a lot of regression tests
Small number of product changes
But still have to validate all existing functionality Its really important to build automation in v1. so its ready for all those patches!
IBM Software
Its a delicate balance
Like pretty much everything about software development
Mature products tend to have a lot of expectations about things that have worked in the past
And a lot of tests to prove it
What if they arent automated?
If you run everything thats ever been run in the past (automated or manual)
How long will that take?
How much value does it add? What level of confidence does that imply?
IBM Software
Making the technical decision on how to automate
Whats the right test insertion point?
API
Product change is usually behind the API, not TO the API Focus on API sequencing used by the GUIs & customer scenarios
GUI
Stability: Work with the product development team to consider GUI as a feature that needs to be stabilized in iterations
SOA or other services make this available
Valuable GUI automation is available before the end of the release
IBM Software
Automation choices
Design your automation solution to leverage your architecture and reduce maintenance
GUI
API Tests Integration scenarios
Unit Test & TDD
10
IBM Software
Automating APIs
Automate regression testing throughout the testing lifecycle
Test across all technologies, from web services, to mainframe, mobile, etc.
Test complex systems-ofsystems integration
Rational Test Workbench:
Integration testing
11
11
IBM Software
Automating GUIs
Increase repeatability through automated test playback Test more critical functions faster with automation
Track and communicate progress and regressions throughout the testing lifecycle
Rational Test Workbench:
12
GUI Functional testing
IBM Software
What about running those tests?
System dependencies are a key challenge in setting up test environments
It takes too long It takes too much hardware
Public Cloud
Private Cloud
EJB Business Partners Shared Services
App Under Test Routing Content Service Collaboration Providers Third-party Services Archives Portals File systems
Messaging Services
Its too complicated
No one knows how to set up EVERYTHING
Directory Identity
Data Warehouse
Mainframe
Enterprise Service Bus
Heterogeneous Environments
13
IBM Software
Automate test environment setup
Public Cloud Private Cloud
App Under Test Business EJB Partners Shared Services Messaging Services App Under Test Routing Content Service Collaboration Providers Third-party Services Archives Portals File systems
Capture & Model
Directory Identity Data Warehouse
Databases
Mainframe applications
Third-party Services
Mainframe
Enterprise Service Bus
Packaged apps, messaging services, etc.
Virtual Services
Heterogeneous Environments
Virtual Services simulate the behavior of an entire application or system during testing
Virtual Services can run on commodity hardware, private cloud, public cloud Each developer, tester can easily have their own test environment Developer and testers continue to use their testing tools (Manual, Web performance, UI test automation)
Rational Test Virtualization Server
14
IBM Software
Lights out testing? Paging DevOps!
Service Virtualization
IBM SmartCloud Continuous Delivery
15
IBM Software
Regression suite environments
Risk and efficiency questions
- How close to production does the test environment need to be? - Balancing setup time & cost against fidelity How many patches? How many runs? How much change?
Rational Test Virtualization Server + IBM SmartCloud Continuous Delivery
16
IBM Software
Water, water everywhere
What do I do with all these tests?
Successfully building tests leads to, um, too many tests Even if its all automated it can take too long to run everything And do you need to ? How to define the right amount of test coverage for a regression suite?
17
IBM Software
Planning for risk management
Collaborative planning of risk mitigation strategy
Risk assessments captured in Test Plan and Test Cases Base project planning on qualitative risk analysis
Test Case will contain a risk failure score and a risk priority score Documented risk related decisions
IBM Rational Quality Manager
18 18
IBM Software
Comprehensive real-time test planning
Visibility across the entire team
A Test Plan is a dynamic view, not an artifact
Defines test process, scope, strategy Can be tailored to specific process. certification, or qualification standards Activities are connected to the execution and always reflect up-to-date information
A Test Plan is a realtime dashboard into a set of business objectives
Quality criteria are clearly defined, and can be reused across projects, iterations All team members are working towards the same objectives Reporting and dashboards inform all stakeholders on status and progress
IBM Rational Quality Manager
19
IBM Software
Automate where it matters most!
Assume a new feature, or a change in Requirements Executing the full regression tests is expensive and often unrealistic! What about several suites of automated regression tests
1. Highest Return: Execute tests that contribute to high coverage of the requirements, then any others Quickly Lower Risk: Execute tests for the most critical requirements, then any others Practically Safe: Execute tests for all the critical requirements, then any others Especially since often ~20% of the test cases are covering ~80% of the business value
Requirements Coverage
High requirements
Most critical Requirements
Low contribution
Test Suites
2.
3.
IBM Rational Quality Manager
20
IBM Software
Maximize your teams productivity
Planners
Plan for regressions
Choose the right areas to regress Report on regression test results
Doers
Create regression tests Maintain regression tests suites
Automated Doers
Execute regression tests Automate test execution
21
21
IBM Software
Leverage traceability
Requirements Composer Collection
Team Concert Plan
Quality Manager Test Plan
Story Story
Work Items Story xyz
Test Cases Test Cases Test Scripts Test Scripts
Requirements Requirements
Defects Defects
Test Results Test Results
Rational Collaborative Lifecycle Management
22
IBM Software
Build in regression testing as a matter of habit
Planners
Plan for regressions every release, every update Choose the right areas to regress high use, high risk areas Report on regression test results every build, every milestone
Doers
Create regression tests update regression suite after each release Maintain regression tests suites re-run the suite and update after each release
Automated Doers
Execute regression tests use tools to integrate regression runs into your builds
23
23
IBM Software
Regression testing: quality differentiator for your team
Your team will be honored for a high degree of business value. High software quality will become a product differentiator
$$$
Growth Projects will exceed expectations!
24
IBM Software
Summary
A Goldilocks problem
Its easy to have too much or too little regression testing Prepare for pruning the regression suites
Build automation destined to be regression testing as soon as possible
Consider this use case when deciding what to automate and how Your organizations patch support and cycle is a focus
Combining automation techniques is powerful
Automate test setup through service virtualization Automate APIs for service testing, functional tests and customer scenarios
Automate via the GUI for end-user experience validation
25
IBM Software
26
IBM Software
www.ibm.com/software/rational
Copyright IBM Corporation 2011. 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 IBMs 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, Telelogic, the Telelogic 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.
2727