SlideShare une entreprise Scribd logo
1  sur  22
Télécharger pour lire hors ligne
Things Could Get Worse:
Ideas About Regression Testing
Michael Bolton
http://www.developsense.com

Michael Bolton
michael@developsense.com
http://www.developsense.com

Great Wall of China
August, 2012

1
Michael Bolton
michael@developsense.com
http://www.developsense.com

Great Wall of China
August, 2012

Do You See A Problem Here?

On starting Microsoft Office 2010 Business Contact Manager Setup Wizard

No regression test found this problem.
This is not a case of something getting worse,
but something that’s bad to start with.

2
The Russian Optimist
Oh, come on!
Things could
get worse!

Things couldn’t
possibly get any
worse!

Four Concepts of Regression Testing
Any test
that we’ve
performed
before.

A set of
automated checks,
run periodically
and repeatedly.

Testing that
we perform
after some
change.

Testing to probe
whether quality
has got worse.

3
Two Key Notions of Regression Testing
Any test
that we’ve
performed
before.

Testing to probe
whether quality
has got worse.

A repeated test
might not show that quality has got worse…
…and a test that shows that quality has got worse might
be a new test.

4
A Regression Testing Hypothesis
• Regression is an important product & project risk.
• Programmers are working so fast (especially in Agile),
there’s a danger of breaking stuff.
• Breaking stuff that worked before is embarrassing.
• Breaking stuff that was broken and fixed before is
really embarrassing.
• THEREFORE we should focus the bulk of our attention
on
– tests that we’ve performed before
– automated checks
– testing after changes

What Wikipedia Says
• “The intent of regression testing is to ensure that a
change, such as a bug fix, did not introduce new
faults.”
• “One of the main reasons for regression testing is to
determine whether a change in one part of the
software affects other parts of the software.”
• “Regression testing can be used to test a system
efficiently by systematically selecting the appropriate
minimum set of tests needed to adequately cover a
particular change.”

5
How Do You Cover an Ocean?
The risks we know about.

The risks
we can imagine.

All the risks there are.

Testing is Always Sampling
The tests we repeat.

The tests
we have performed.

All the tests we could perform.

6
Ye Olde Booke of Tests

“Any test that we’ve performed before”
• Is the primary purpose of testing to reveal new information
about the product?
• If so, what is the information value of repeating a test that
we’ve already performed?

When moving forward,
how much time should we spend looking behind us?

7
Checking vs. Testing
A CHECK is…
1. An observation linked to…
2. A decision rule such that…
3. both the observation and the decision rule can be applied nonsapiently

A non-sapient activity can be performed

by a machine
that can’t think
(but that is quick and precise)

by a human who has been
instructed not to think
(and who is slow and variable)

Checks
Very good for
• Decidable propositions
• Anticipated risks
• Confirmation
• Verification
• Rapid execution
• Some bugs*
• Precision
• Functional correctness
• Low-level checking

Maybe not so good for
• Open-ended questions
• Unanticipated risks
• Exploration
• Qualitative evaluation
• Reflection
• Most issues*
• Nuance
• Parafunctional quality
• High-level testing

* A bug is a problem that threatens the value of the product.
An issue threatens the value of the testing, the project, or the business.

8
Pass or Fail?
• When a check “passes”, it usually means “we (or
the automation) didn’t detect anything that
might be a problem”.
• When a check “fails”, it usually means “we (or the
automation) detected something that might be a
problem”.

Pass or Fail?
• When a check “passes”, it usually means “we (or
the automation) didn’t detect anything that
might be a problem”.
• When a check “fails”, it usually means “we (or the
automation) detected something that might be a
problem”.
• Instead of “pass or fail”, skilled testers focus on a
more fundamental question:

9
Do Tests Really Pass or Fail?

Might it be better to ask,
“What can we learn from this test?
And what else can we learn?”

Insufficient Regression Check Focus
• may suppress or delay discovery of functional
problems
• may suppress other kinds of variation
• may suppress learning about the API (when
checks are performed without automation
assistance)
• increases bug investigation and reporting time
(when not done by programmers)
• increases the length of the feedback loop (when
not done by programmers)

10
Excessive Regression Check Focus
• may suppress discovery of risks
– especially when that focus is on the execution of
checks.

• may suppress discovery of unchecked problems
• may suppress discovery of unnoticed value
• may suppress learning about the program
generally
• may suppress learning about user's task
• may suppress certain kinds of variation

“Tests to probe whether quality has got worse.”
Capability
Reliability
Usability
Charisma

=

Can be checked

Security

=

Some checking helps

Scalability

=

Must be tested

Performance
Installability
Compatibility
Supportability
Testability

11
What Else Could We Observe?
• Every test is multivariate
– though not every check is multivariate

• A focus on a single oracle can distract us from
other things, so…
• If you’re going to check, try checking several
things at once. Gather lots of data!
• Look at the data! Take advantage of human
pattern recognition.

Is Regression The Biggest Risk?
• Before the Agile Manifesto was declared, a group of
experienced test managers reported that regression
problems ran from 6-15% of discovered problems
• In Agile shops, we now (supposedly) have
–
–
–
–
–
–

TDD
unit tests
pairing
configuration management
build and version control
continuous integration

• …many of which already check for regression
• How serious a risk is regression given these things?
• Are we paying attention to what regression tells us?

12
Maybe Regression Problems Are Symptoms

• If you see a consistent pattern of regression
– maybe failing checks or tests aren’t your biggest problem
– more likely, the issue is that you’ve got favourable conditions
for regression to happen
– this is a potentially serious risk that testing can only detect, and
that more testing cannot fix. THAT’S A SEVERITY-ONE ISSUE.

Maybe FEAR of regression
is a symptom, too.

• Pay attention to feelings, worries, obsessions.
• Feelings are signals; what are they signaling?
• What are the problems behind the fear?

13
The Goalie Problem

Even on a great team, great goaltending will miss some shots.

The Goalie Problem

Not even great goaltending can make up for a weak defense.

14
Dimensions of Testing Costs
$ Design time
$ Development cost
$ Maintenance cost
$ Transfer cost
$ Equipment cost
$ Setup cost
$ Execution cost
$ Opportunity cost
How do these apply to checks? To other kinds of testing?

To test is to compose, edit, narrate,
and justify THREE stories.
A story about the status of the PRODUCT…
…about how it failed, and how it might fail...
…in ways that matter to your various clients.

A story about HOW YOU TESTED it…
…how you configured, operated and observed it…
…what you haven’t tested yet, but what you might test…
…and what won’t test, at all, unless things change.

A story about HOW GOOD that testing was…
…what the risks and costs of testing are…
…what made testing harder or slower…
…how testable (or not) the product is…
…what you need and what
you recommend.

30

15
Exercise:
Reasons to Repeat Tests

Reasons to Repeat
• Heuristics from Rapid Software Testing
–
–
–
–
–
–
–
–
–
–

Recharge (renewed relevance when things change)
Intermittency (some tests take repetition to reveal bugs)
Retry (human observers see things differently each time)
Mutation (you can change something about the test)
Benchmark (tracking progress requires repetition)
Importance (the test is too critical to put aside)
Mandate (sometimes we do exactly what we’re told)
Inexpensiveness (why not run a test if it’s cheap?)
Enoughness (some suites might give adequate coverage)
Avoidance/indifference (you might repeat a test when testing
isn’t really the goal)
http://www.satisfice.com/repeatable.shtml

16
Heuristics for Regression Testing
• Heuristics from Karen Johnson: RCRCRC
–
–
–
–
–
–

Recent (what has changed lately?)
Core (what’s really common and critical?)
Risk (where is there danger, complexity, brittleness?)
Configuration-sensitive (what’s variable and vulnerable?)
Repaired (did it really get fixed? did it break something else?)
Chronic (what are the patterns in collections of problems?)
http://searchsoftwarequality.techtarget.com/tip/A-softwareexperts-heuristic-for-regression-testing

• We could add even more Rs and Cs!
– Randomized (high-volume, high-speed automated checks)
• but beware the oracle problem

– Confusing (poorly-understood or poorly-agreed-upon areas)
– Rich (complex scenarios to shake out lots of problems)
– Compelling (bugs that spark newspaper stories)

Regression Automation Heuristics
• Heuristics from Mike Kelly
– To recreate the path to a specific bug
– To capture current functionality to address potential
breakage problems
– To automate checks in areas that are so important
they must be checked
– To address code coverage gaps
– To addressing requirements coverage gaps
– To address a particular model of the problem space
(e.g. all-pairs coverage)
http://www.michaeldkelly.com (look for it under “media”)
OR
http://bit.ly/Ugdge8

17
What Wikipedia Says
• “The intent of regression testing is to ensure
that a change, such as a bug fix, did not
introduce new faults”
• AND ALSO to investigate whether the fix
addressed the general instance of the problem,
or just the specific
• AND ALSO to investigate whether there were
faults we missed in that area

What Wikipedia Says
• “One of the main reasons for regression testing
is to determine whether a change in one part of
the software affects other parts of the
software.”
• AND ALSO to learn about the relationships
between parts of the software, to see where
future changes might have other affects
• AND ALSO to see how changes in other things
affect the system

18
What Wikipedia Says
• “Regression testing can be used to test a system
efficiently by systematically selecting the appropriate
minimum set of tests needed to adequately cover a
particular change.”
• AND ALSO to question the notion of “the appropriate
minimum number of tests”
• AND ALSO, especially in design, to question our notion
of “adequate coverage”.
• AND ALSO to increase dramatically the ways in which
we could observe the product
• But how do you “systematically select”?

A Regression Testing Hypothesis
• Regression is an important product & project risk
• and there are other important risks.
• Programmers are working so fast (especially in Agile),
there’s a danger of breaking stuff.
• Maybe they should maintain a sustainable pace
• Maybe they should work more carefully.
• Maybe they should work more collaboratively.
• Maybe the stuff they’re working on should be less
interdependent.
– NOTE: testers can identify project risks like these
but be careful: we don’t manage the programmers or the
project

19
A Regression Testing Hypothesis
I seem to recall the
original XP risk
• Regression is an important product & projecttalk
putting more
• and there are other important risks.
emphasis on this
• Programmers are working so fast (especially in Agile),
stuff.
there’s a danger of breaking stuff.
• Maybe they should maintain a sustainable pace
• Maybe they should work more carefully.
• Maybe they should work more collaboratively.
• Maybe the stuff they’re working on should be less
interdependent.

}

– NOTE: testers can identify project risks like these
but be careful: we don’t manage the programmers or the
project

A Regression Testing Hypothesis
• Breaking stuff that worked before is embarrassing.
• Breaking stuff that was broken and fixed before is really
embarrassing.
• and having bugs that we never noticed at all is also
embarrassing
• THEREFORE we should focus attention on
– tests that we’ve performed before
– automated checks
– testing after changes

• AND ALSO ON
– performing new testing that extends coverage, giving
– a more comprehensive understanding of the product and
– a reasonable chance of identifying regression problems

20
Contrasting (and Complementary)
Test Strategy Ideas
checking
passing checks
large number of checks
noting regression problems
detecting regression
preventing regression
quicker development
making sure that our checks are
passing
testing to search for bugs we
anticipate

testing
checks that trigger questions
increasing test coverage
noting problems generally
preventing regression
preventing problems
more reliable development
making sure that we understand
the product
testing to learn about the product
and new risk ideas

Ancient Wisdom
One of the lessons to be learned … is that the sheer number of
tests performed is of little significance in itself. Too often, the
series of tests simply proves how good the computer is at
doing the same things with different numbers. As in many
instances, we are probably misled here by our experiences
with people, whose inherent reliability on repetitive work is at
best variable. With a computer program, however, the greater
problem is to prove adaptability, something which is not trivial
in human functions either. Consequently we must be sure that
each test does some work not done by previous tests. To do
this, we must struggle to develop a suspicious nature as well as
a lively imagination.”
Herbert Leeds and Gerald M. Weinberg, Computer Programming Fundamentals, 1961

21
Final Ideas
• Sort out the difference between regression and
repetition.
• Regression testing is an airbag that will sometimes
protect you. It’s not a substitute for good driving.
• Examine the motives for regression testing.
• Examine the causes of regression.
• Ask how we might detect and prevent regression more
quickly, less expensively, more reliably.
– checks can be good, and there are other ways

• Consider what your testing is telling you
– and tell that story.
• Think of checking as an element of testing.
• Think cost vs. value.
• Focus on adaptability, not just repeatability.

Questions?
Michael Bolton
michael@developsense.com
http://www.developsense.com
Twitter: @michaelbolton
Don’t bother with Facebook.
Or LinkedIn.

22

Contenu connexe

Tendances

Exploratory Testing in an Agile Context
Exploratory Testing in an Agile ContextExploratory Testing in an Agile Context
Exploratory Testing in an Agile Context
Elisabeth Hendrickson
 
Rapid software testing
Rapid software testingRapid software testing
Rapid software testing
Sachin MK
 
[HCMC STC Jan 2015] Proving Our Worth Quantifying The Value Of Testing
[HCMC STC Jan 2015] Proving Our Worth  Quantifying The Value Of Testing[HCMC STC Jan 2015] Proving Our Worth  Quantifying The Value Of Testing
[HCMC STC Jan 2015] Proving Our Worth Quantifying The Value Of Testing
Ho Chi Minh City Software Testing Club
 

Tendances (20)

Exploratory testing using heuristics
Exploratory testing using heuristicsExploratory testing using heuristics
Exploratory testing using heuristics
 
Test Strategy-The real silver bullet in testing by Matthew Eakin
Test Strategy-The real silver bullet in testing by Matthew EakinTest Strategy-The real silver bullet in testing by Matthew Eakin
Test Strategy-The real silver bullet in testing by Matthew Eakin
 
Fantastic Tests - The Crimes of Bad Test Design
Fantastic Tests - The Crimes of Bad Test DesignFantastic Tests - The Crimes of Bad Test Design
Fantastic Tests - The Crimes of Bad Test Design
 
Exploratory Testing in an Agile Context
Exploratory Testing in an Agile ContextExploratory Testing in an Agile Context
Exploratory Testing in an Agile Context
 
Exploratory test
Exploratory testExploratory test
Exploratory test
 
Break to build - the mindset of the modern day tester
Break to build - the mindset of the modern day testerBreak to build - the mindset of the modern day tester
Break to build - the mindset of the modern day tester
 
A New Model for Testing
A New Model for TestingA New Model for Testing
A New Model for Testing
 
Test automation – the bitter truth
Test automation – the bitter truthTest automation – the bitter truth
Test automation – the bitter truth
 
Rapid software testing
Rapid software testingRapid software testing
Rapid software testing
 
Hindsight lessons about API testing
Hindsight lessons about API testingHindsight lessons about API testing
Hindsight lessons about API testing
 
[HCMC STC Jan 2015] Proving Our Worth Quantifying The Value Of Testing
[HCMC STC Jan 2015] Proving Our Worth  Quantifying The Value Of Testing[HCMC STC Jan 2015] Proving Our Worth  Quantifying The Value Of Testing
[HCMC STC Jan 2015] Proving Our Worth Quantifying The Value Of Testing
 
Four Stages of Automated Testing by Bradley Temple
Four Stages of Automated Testing by Bradley TempleFour Stages of Automated Testing by Bradley Temple
Four Stages of Automated Testing by Bradley Temple
 
Worst practices in software testing by the Testing troll
Worst practices in software testing by the Testing trollWorst practices in software testing by the Testing troll
Worst practices in software testing by the Testing troll
 
"Worst" practices of software testing
"Worst" practices of software testing"Worst" practices of software testing
"Worst" practices of software testing
 
Exploratory Testing
Exploratory TestingExploratory Testing
Exploratory Testing
 
What is What is Professional Testing?
What is What is Professional Testing?What is What is Professional Testing?
What is What is Professional Testing?
 
From Gatekeeper to Partner by Kelsey Shannahan
From Gatekeeper to Partner by Kelsey ShannahanFrom Gatekeeper to Partner by Kelsey Shannahan
From Gatekeeper to Partner by Kelsey Shannahan
 
Automation vs. intelligence - "follow me if you want to live"
Automation vs. intelligence - "follow me if you want to live"Automation vs. intelligence - "follow me if you want to live"
Automation vs. intelligence - "follow me if you want to live"
 
James thomas
James thomasJames thomas
James thomas
 
03 - chomu prohramisty ne testuiut - yurii chulovskyi - it event 2013 (5)
03 -  chomu prohramisty ne testuiut - yurii chulovskyi - it event 2013 (5)03 -  chomu prohramisty ne testuiut - yurii chulovskyi - it event 2013 (5)
03 - chomu prohramisty ne testuiut - yurii chulovskyi - it event 2013 (5)
 

En vedette

12 cadpe aw5-2
12 cadpe aw5-212 cadpe aw5-2
12 cadpe aw5-2
TechWell
 

En vedette (15)

Quantifying the Value of Testing
Quantifying the Value of TestingQuantifying the Value of Testing
Quantifying the Value of Testing
 
Automation Culture: Essential to Agile Success
Automation Culture: Essential to Agile SuccessAutomation Culture: Essential to Agile Success
Automation Culture: Essential to Agile Success
 
Think Different: Visualization Tools for Testers
Think Different: Visualization Tools for TestersThink Different: Visualization Tools for Testers
Think Different: Visualization Tools for Testers
 
Keynote: The Art of Change: Influence Skills for Leaders
Keynote: The Art of Change: Influence Skills for LeadersKeynote: The Art of Change: Influence Skills for Leaders
Keynote: The Art of Change: Influence Skills for Leaders
 
Flintstones or Jetsons? Jump Start Your Virtual Test Lab
Flintstones or Jetsons? Jump Start Your Virtual Test LabFlintstones or Jetsons? Jump Start Your Virtual Test Lab
Flintstones or Jetsons? Jump Start Your Virtual Test Lab
 
Massive Continuous Integration and Light-speed Iterations
Massive Continuous Integration and Light-speed IterationsMassive Continuous Integration and Light-speed Iterations
Massive Continuous Integration and Light-speed Iterations
 
12 cadpe aw5-2
12 cadpe aw5-212 cadpe aw5-2
12 cadpe aw5-2
 
Rapid Software Testing: Reporting
Rapid Software Testing: ReportingRapid Software Testing: Reporting
Rapid Software Testing: Reporting
 
IT Governance and Compliance in an Agile World
IT Governance and Compliance in an Agile WorldIT Governance and Compliance in an Agile World
IT Governance and Compliance in an Agile World
 
A Year of Testing in the Cloud: Lessons Learned
A Year of Testing in the Cloud: Lessons LearnedA Year of Testing in the Cloud: Lessons Learned
A Year of Testing in the Cloud: Lessons Learned
 
Android Mobile Testing: Right before Your Eyes
Android Mobile Testing: Right before Your EyesAndroid Mobile Testing: Right before Your Eyes
Android Mobile Testing: Right before Your Eyes
 
How to Break Software: Web 101+ Edition
How to Break Software: Web 101+ EditionHow to Break Software: Web 101+ Edition
How to Break Software: Web 101+ Edition
 
Getting Started with Risk-Based Testing
Getting Started with Risk-Based TestingGetting Started with Risk-Based Testing
Getting Started with Risk-Based Testing
 
Keynote: Know the Way, Show the Way, Go the Way: Scaling Agile Development
Keynote: Know the Way, Show the Way, Go the Way: Scaling Agile DevelopmentKeynote: Know the Way, Show the Way, Go the Way: Scaling Agile Development
Keynote: Know the Way, Show the Way, Go the Way: Scaling Agile Development
 
Testing the Data Warehouse—Big Data, Big Problems
Testing the Data Warehouse—Big Data, Big ProblemsTesting the Data Warehouse—Big Data, Big Problems
Testing the Data Warehouse—Big Data, Big Problems
 

Similaire à Things Could Get Worse: Ideas About Regression Testing

A Rapid Introduction to Rapid Software Testing
A Rapid Introduction to Rapid Software TestingA Rapid Introduction to Rapid Software Testing
A Rapid Introduction to Rapid Software Testing
TechWell
 
Mal12 qa tand-automatedtesting
Mal12 qa tand-automatedtestingMal12 qa tand-automatedtesting
Mal12 qa tand-automatedtesting
andytinkham
 
Commonly Held Beliefs about Test Cases v1.0
Commonly Held Beliefs about Test Cases v1.0Commonly Held Beliefs about Test Cases v1.0
Commonly Held Beliefs about Test Cases v1.0
Dave Bell
 
Tester Challenges in Agile ?
Tester Challenges in Agile ?Tester Challenges in Agile ?
Tester Challenges in Agile ?
alind tiwari
 

Similaire à Things Could Get Worse: Ideas About Regression Testing (20)

SAM
SAMSAM
SAM
 
Improve Testing with a Zone Defense
Improve Testing with a Zone DefenseImprove Testing with a Zone Defense
Improve Testing with a Zone Defense
 
A Rapid Introduction to Rapid Software Testing
A Rapid Introduction to Rapid Software TestingA Rapid Introduction to Rapid Software Testing
A Rapid Introduction to Rapid Software Testing
 
A Rapid Introduction to Rapid Software Testing
A Rapid Introduction to Rapid Software TestingA Rapid Introduction to Rapid Software Testing
A Rapid Introduction to Rapid Software Testing
 
A Rapid Introduction to Rapid Software Testing
A Rapid Introduction to Rapid Software TestingA Rapid Introduction to Rapid Software Testing
A Rapid Introduction to Rapid Software Testing
 
Design testabilty
Design testabiltyDesign testabilty
Design testabilty
 
Testing As A Bottleneck - How Testing Slows Down Modern Development Processes...
Testing As A Bottleneck - How Testing Slows Down Modern Development Processes...Testing As A Bottleneck - How Testing Slows Down Modern Development Processes...
Testing As A Bottleneck - How Testing Slows Down Modern Development Processes...
 
Fundamentals of testing
Fundamentals of testingFundamentals of testing
Fundamentals of testing
 
Agile testingandautomation
Agile testingandautomationAgile testingandautomation
Agile testingandautomation
 
Mal12 qa tand-automatedtesting
Mal12 qa tand-automatedtestingMal12 qa tand-automatedtesting
Mal12 qa tand-automatedtesting
 
Commonly Held Beliefs about Test Cases v1.0
Commonly Held Beliefs about Test Cases v1.0Commonly Held Beliefs about Test Cases v1.0
Commonly Held Beliefs about Test Cases v1.0
 
Bad Metric, Bad!
Bad Metric, Bad!Bad Metric, Bad!
Bad Metric, Bad!
 
Tester Challenges in Agile ?
Tester Challenges in Agile ?Tester Challenges in Agile ?
Tester Challenges in Agile ?
 
Agile process
Agile processAgile process
Agile process
 
Fundamentals of testing
Fundamentals of testingFundamentals of testing
Fundamentals of testing
 
Will The Test Leaders Stand Up?
Will The Test Leaders Stand Up?Will The Test Leaders Stand Up?
Will The Test Leaders Stand Up?
 
Testing within an Agile Environment - Beyza Sakir and Chris Gollop
Testing within an Agile Environment - Beyza Sakir and Chris GollopTesting within an Agile Environment - Beyza Sakir and Chris Gollop
Testing within an Agile Environment - Beyza Sakir and Chris Gollop
 
Performance testing mistakes newbies make
Performance testing mistakes newbies makePerformance testing mistakes newbies make
Performance testing mistakes newbies make
 
Dare to Explore: Discover ET!
Dare to Explore: Discover ET!Dare to Explore: Discover ET!
Dare to Explore: Discover ET!
 
Fundamental of testing (what is testing)
Fundamental of testing (what is testing)Fundamental of testing (what is testing)
Fundamental of testing (what is testing)
 

Plus de TechWell

Plus de TechWell (20)

Failing and Recovering
Failing and RecoveringFailing and Recovering
Failing and Recovering
 
Instill a DevOps Testing Culture in Your Team and Organization
Instill a DevOps Testing Culture in Your Team and Organization Instill a DevOps Testing Culture in Your Team and Organization
Instill a DevOps Testing Culture in Your Team and Organization
 
Test Design for Fully Automated Build Architecture
Test Design for Fully Automated Build ArchitectureTest Design for Fully Automated Build Architecture
Test Design for Fully Automated Build Architecture
 
System-Level Test Automation: Ensuring a Good Start
System-Level Test Automation: Ensuring a Good StartSystem-Level Test Automation: Ensuring a Good Start
System-Level Test Automation: Ensuring a Good Start
 
Build Your Mobile App Quality and Test Strategy
Build Your Mobile App Quality and Test StrategyBuild Your Mobile App Quality and Test Strategy
Build Your Mobile App Quality and Test Strategy
 
Testing Transformation: The Art and Science for Success
Testing Transformation: The Art and Science for SuccessTesting Transformation: The Art and Science for Success
Testing Transformation: The Art and Science for Success
 
Implement BDD with Cucumber and SpecFlow
Implement BDD with Cucumber and SpecFlowImplement BDD with Cucumber and SpecFlow
Implement BDD with Cucumber and SpecFlow
 
Develop WebDriver Automated Tests—and Keep Your Sanity
Develop WebDriver Automated Tests—and Keep Your SanityDevelop WebDriver Automated Tests—and Keep Your Sanity
Develop WebDriver Automated Tests—and Keep Your Sanity
 
Ma 15
Ma 15Ma 15
Ma 15
 
Eliminate Cloud Waste with a Holistic DevOps Strategy
Eliminate Cloud Waste with a Holistic DevOps StrategyEliminate Cloud Waste with a Holistic DevOps Strategy
Eliminate Cloud Waste with a Holistic DevOps Strategy
 
Transform Test Organizations for the New World of DevOps
Transform Test Organizations for the New World of DevOpsTransform Test Organizations for the New World of DevOps
Transform Test Organizations for the New World of DevOps
 
The Fourth Constraint in Project Delivery—Leadership
The Fourth Constraint in Project Delivery—LeadershipThe Fourth Constraint in Project Delivery—Leadership
The Fourth Constraint in Project Delivery—Leadership
 
Resolve the Contradiction of Specialists within Agile Teams
Resolve the Contradiction of Specialists within Agile TeamsResolve the Contradiction of Specialists within Agile Teams
Resolve the Contradiction of Specialists within Agile Teams
 
Pin the Tail on the Metric: A Field-Tested Agile Game
Pin the Tail on the Metric: A Field-Tested Agile GamePin the Tail on the Metric: A Field-Tested Agile Game
Pin the Tail on the Metric: A Field-Tested Agile Game
 
Agile Performance Holarchy (APH)—A Model for Scaling Agile Teams
Agile Performance Holarchy (APH)—A Model for Scaling Agile TeamsAgile Performance Holarchy (APH)—A Model for Scaling Agile Teams
Agile Performance Holarchy (APH)—A Model for Scaling Agile Teams
 
A Business-First Approach to DevOps Implementation
A Business-First Approach to DevOps ImplementationA Business-First Approach to DevOps Implementation
A Business-First Approach to DevOps Implementation
 
Databases in a Continuous Integration/Delivery Process
Databases in a Continuous Integration/Delivery ProcessDatabases in a Continuous Integration/Delivery Process
Databases in a Continuous Integration/Delivery Process
 
Mobile Testing: What—and What Not—to Automate
Mobile Testing: What—and What Not—to AutomateMobile Testing: What—and What Not—to Automate
Mobile Testing: What—and What Not—to Automate
 
Cultural Intelligence: A Key Skill for Success
Cultural Intelligence: A Key Skill for SuccessCultural Intelligence: A Key Skill for Success
Cultural Intelligence: A Key Skill for Success
 
Turn the Lights On: A Power Utility Company's Agile Transformation
Turn the Lights On: A Power Utility Company's Agile TransformationTurn the Lights On: A Power Utility Company's Agile Transformation
Turn the Lights On: A Power Utility Company's Agile Transformation
 

Dernier

+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
?#DUbAI#??##{{(☎️+971_581248768%)**%*]'#abortion pills for sale in dubai@
 
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers:  A Deep Dive into Serverless Spatial Data and FMECloud Frontiers:  A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
Safe Software
 
Why Teams call analytics are critical to your entire business
Why Teams call analytics are critical to your entire businessWhy Teams call analytics are critical to your entire business
Why Teams call analytics are critical to your entire business
panagenda
 
Architecting Cloud Native Applications
Architecting Cloud Native ApplicationsArchitecting Cloud Native Applications
Architecting Cloud Native Applications
WSO2
 

Dernier (20)

EMPOWERMENT TECHNOLOGY GRADE 11 QUARTER 2 REVIEWER
EMPOWERMENT TECHNOLOGY GRADE 11 QUARTER 2 REVIEWEREMPOWERMENT TECHNOLOGY GRADE 11 QUARTER 2 REVIEWER
EMPOWERMENT TECHNOLOGY GRADE 11 QUARTER 2 REVIEWER
 
How to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerHow to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected Worker
 
ICT role in 21st century education and its challenges
ICT role in 21st century education and its challengesICT role in 21st century education and its challenges
ICT role in 21st century education and its challenges
 
Corporate and higher education May webinar.pptx
Corporate and higher education May webinar.pptxCorporate and higher education May webinar.pptx
Corporate and higher education May webinar.pptx
 
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
 
Six Myths about Ontologies: The Basics of Formal Ontology
Six Myths about Ontologies: The Basics of Formal OntologySix Myths about Ontologies: The Basics of Formal Ontology
Six Myths about Ontologies: The Basics of Formal Ontology
 
DEV meet-up UiPath Document Understanding May 7 2024 Amsterdam
DEV meet-up UiPath Document Understanding May 7 2024 AmsterdamDEV meet-up UiPath Document Understanding May 7 2024 Amsterdam
DEV meet-up UiPath Document Understanding May 7 2024 Amsterdam
 
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers:  A Deep Dive into Serverless Spatial Data and FMECloud Frontiers:  A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
 
Why Teams call analytics are critical to your entire business
Why Teams call analytics are critical to your entire businessWhy Teams call analytics are critical to your entire business
Why Teams call analytics are critical to your entire business
 
DBX First Quarter 2024 Investor Presentation
DBX First Quarter 2024 Investor PresentationDBX First Quarter 2024 Investor Presentation
DBX First Quarter 2024 Investor Presentation
 
Connector Corner: Accelerate revenue generation using UiPath API-centric busi...
Connector Corner: Accelerate revenue generation using UiPath API-centric busi...Connector Corner: Accelerate revenue generation using UiPath API-centric busi...
Connector Corner: Accelerate revenue generation using UiPath API-centric busi...
 
AWS Community Day CPH - Three problems of Terraform
AWS Community Day CPH - Three problems of TerraformAWS Community Day CPH - Three problems of Terraform
AWS Community Day CPH - Three problems of Terraform
 
WSO2's API Vision: Unifying Control, Empowering Developers
WSO2's API Vision: Unifying Control, Empowering DevelopersWSO2's API Vision: Unifying Control, Empowering Developers
WSO2's API Vision: Unifying Control, Empowering Developers
 
Strategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
Strategize a Smooth Tenant-to-tenant Migration and Copilot TakeoffStrategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
Strategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
 
Artificial Intelligence Chap.5 : Uncertainty
Artificial Intelligence Chap.5 : UncertaintyArtificial Intelligence Chap.5 : Uncertainty
Artificial Intelligence Chap.5 : Uncertainty
 
Architecting Cloud Native Applications
Architecting Cloud Native ApplicationsArchitecting Cloud Native Applications
Architecting Cloud Native Applications
 
Apidays New York 2024 - The value of a flexible API Management solution for O...
Apidays New York 2024 - The value of a flexible API Management solution for O...Apidays New York 2024 - The value of a flexible API Management solution for O...
Apidays New York 2024 - The value of a flexible API Management solution for O...
 
Introduction to Multilingual Retrieval Augmented Generation (RAG)
Introduction to Multilingual Retrieval Augmented Generation (RAG)Introduction to Multilingual Retrieval Augmented Generation (RAG)
Introduction to Multilingual Retrieval Augmented Generation (RAG)
 
Web Form Automation for Bonterra Impact Management (fka Social Solutions Apri...
Web Form Automation for Bonterra Impact Management (fka Social Solutions Apri...Web Form Automation for Bonterra Impact Management (fka Social Solutions Apri...
Web Form Automation for Bonterra Impact Management (fka Social Solutions Apri...
 
Polkadot JAM Slides - Token2049 - By Dr. Gavin Wood
Polkadot JAM Slides - Token2049 - By Dr. Gavin WoodPolkadot JAM Slides - Token2049 - By Dr. Gavin Wood
Polkadot JAM Slides - Token2049 - By Dr. Gavin Wood
 

Things Could Get Worse: Ideas About Regression Testing

  • 1. Things Could Get Worse: Ideas About Regression Testing Michael Bolton http://www.developsense.com Michael Bolton michael@developsense.com http://www.developsense.com Great Wall of China August, 2012 1
  • 2. Michael Bolton michael@developsense.com http://www.developsense.com Great Wall of China August, 2012 Do You See A Problem Here? On starting Microsoft Office 2010 Business Contact Manager Setup Wizard No regression test found this problem. This is not a case of something getting worse, but something that’s bad to start with. 2
  • 3. The Russian Optimist Oh, come on! Things could get worse! Things couldn’t possibly get any worse! Four Concepts of Regression Testing Any test that we’ve performed before. A set of automated checks, run periodically and repeatedly. Testing that we perform after some change. Testing to probe whether quality has got worse. 3
  • 4. Two Key Notions of Regression Testing Any test that we’ve performed before. Testing to probe whether quality has got worse. A repeated test might not show that quality has got worse… …and a test that shows that quality has got worse might be a new test. 4
  • 5. A Regression Testing Hypothesis • Regression is an important product & project risk. • Programmers are working so fast (especially in Agile), there’s a danger of breaking stuff. • Breaking stuff that worked before is embarrassing. • Breaking stuff that was broken and fixed before is really embarrassing. • THEREFORE we should focus the bulk of our attention on – tests that we’ve performed before – automated checks – testing after changes What Wikipedia Says • “The intent of regression testing is to ensure that a change, such as a bug fix, did not introduce new faults.” • “One of the main reasons for regression testing is to determine whether a change in one part of the software affects other parts of the software.” • “Regression testing can be used to test a system efficiently by systematically selecting the appropriate minimum set of tests needed to adequately cover a particular change.” 5
  • 6. How Do You Cover an Ocean? The risks we know about. The risks we can imagine. All the risks there are. Testing is Always Sampling The tests we repeat. The tests we have performed. All the tests we could perform. 6
  • 7. Ye Olde Booke of Tests “Any test that we’ve performed before” • Is the primary purpose of testing to reveal new information about the product? • If so, what is the information value of repeating a test that we’ve already performed? When moving forward, how much time should we spend looking behind us? 7
  • 8. Checking vs. Testing A CHECK is… 1. An observation linked to… 2. A decision rule such that… 3. both the observation and the decision rule can be applied nonsapiently A non-sapient activity can be performed by a machine that can’t think (but that is quick and precise) by a human who has been instructed not to think (and who is slow and variable) Checks Very good for • Decidable propositions • Anticipated risks • Confirmation • Verification • Rapid execution • Some bugs* • Precision • Functional correctness • Low-level checking Maybe not so good for • Open-ended questions • Unanticipated risks • Exploration • Qualitative evaluation • Reflection • Most issues* • Nuance • Parafunctional quality • High-level testing * A bug is a problem that threatens the value of the product. An issue threatens the value of the testing, the project, or the business. 8
  • 9. Pass or Fail? • When a check “passes”, it usually means “we (or the automation) didn’t detect anything that might be a problem”. • When a check “fails”, it usually means “we (or the automation) detected something that might be a problem”. Pass or Fail? • When a check “passes”, it usually means “we (or the automation) didn’t detect anything that might be a problem”. • When a check “fails”, it usually means “we (or the automation) detected something that might be a problem”. • Instead of “pass or fail”, skilled testers focus on a more fundamental question: 9
  • 10. Do Tests Really Pass or Fail? Might it be better to ask, “What can we learn from this test? And what else can we learn?” Insufficient Regression Check Focus • may suppress or delay discovery of functional problems • may suppress other kinds of variation • may suppress learning about the API (when checks are performed without automation assistance) • increases bug investigation and reporting time (when not done by programmers) • increases the length of the feedback loop (when not done by programmers) 10
  • 11. Excessive Regression Check Focus • may suppress discovery of risks – especially when that focus is on the execution of checks. • may suppress discovery of unchecked problems • may suppress discovery of unnoticed value • may suppress learning about the program generally • may suppress learning about user's task • may suppress certain kinds of variation “Tests to probe whether quality has got worse.” Capability Reliability Usability Charisma = Can be checked Security = Some checking helps Scalability = Must be tested Performance Installability Compatibility Supportability Testability 11
  • 12. What Else Could We Observe? • Every test is multivariate – though not every check is multivariate • A focus on a single oracle can distract us from other things, so… • If you’re going to check, try checking several things at once. Gather lots of data! • Look at the data! Take advantage of human pattern recognition. Is Regression The Biggest Risk? • Before the Agile Manifesto was declared, a group of experienced test managers reported that regression problems ran from 6-15% of discovered problems • In Agile shops, we now (supposedly) have – – – – – – TDD unit tests pairing configuration management build and version control continuous integration • …many of which already check for regression • How serious a risk is regression given these things? • Are we paying attention to what regression tells us? 12
  • 13. Maybe Regression Problems Are Symptoms • If you see a consistent pattern of regression – maybe failing checks or tests aren’t your biggest problem – more likely, the issue is that you’ve got favourable conditions for regression to happen – this is a potentially serious risk that testing can only detect, and that more testing cannot fix. THAT’S A SEVERITY-ONE ISSUE. Maybe FEAR of regression is a symptom, too. • Pay attention to feelings, worries, obsessions. • Feelings are signals; what are they signaling? • What are the problems behind the fear? 13
  • 14. The Goalie Problem Even on a great team, great goaltending will miss some shots. The Goalie Problem Not even great goaltending can make up for a weak defense. 14
  • 15. Dimensions of Testing Costs $ Design time $ Development cost $ Maintenance cost $ Transfer cost $ Equipment cost $ Setup cost $ Execution cost $ Opportunity cost How do these apply to checks? To other kinds of testing? To test is to compose, edit, narrate, and justify THREE stories. A story about the status of the PRODUCT… …about how it failed, and how it might fail... …in ways that matter to your various clients. A story about HOW YOU TESTED it… …how you configured, operated and observed it… …what you haven’t tested yet, but what you might test… …and what won’t test, at all, unless things change. A story about HOW GOOD that testing was… …what the risks and costs of testing are… …what made testing harder or slower… …how testable (or not) the product is… …what you need and what you recommend. 30 15
  • 16. Exercise: Reasons to Repeat Tests Reasons to Repeat • Heuristics from Rapid Software Testing – – – – – – – – – – Recharge (renewed relevance when things change) Intermittency (some tests take repetition to reveal bugs) Retry (human observers see things differently each time) Mutation (you can change something about the test) Benchmark (tracking progress requires repetition) Importance (the test is too critical to put aside) Mandate (sometimes we do exactly what we’re told) Inexpensiveness (why not run a test if it’s cheap?) Enoughness (some suites might give adequate coverage) Avoidance/indifference (you might repeat a test when testing isn’t really the goal) http://www.satisfice.com/repeatable.shtml 16
  • 17. Heuristics for Regression Testing • Heuristics from Karen Johnson: RCRCRC – – – – – – Recent (what has changed lately?) Core (what’s really common and critical?) Risk (where is there danger, complexity, brittleness?) Configuration-sensitive (what’s variable and vulnerable?) Repaired (did it really get fixed? did it break something else?) Chronic (what are the patterns in collections of problems?) http://searchsoftwarequality.techtarget.com/tip/A-softwareexperts-heuristic-for-regression-testing • We could add even more Rs and Cs! – Randomized (high-volume, high-speed automated checks) • but beware the oracle problem – Confusing (poorly-understood or poorly-agreed-upon areas) – Rich (complex scenarios to shake out lots of problems) – Compelling (bugs that spark newspaper stories) Regression Automation Heuristics • Heuristics from Mike Kelly – To recreate the path to a specific bug – To capture current functionality to address potential breakage problems – To automate checks in areas that are so important they must be checked – To address code coverage gaps – To addressing requirements coverage gaps – To address a particular model of the problem space (e.g. all-pairs coverage) http://www.michaeldkelly.com (look for it under “media”) OR http://bit.ly/Ugdge8 17
  • 18. What Wikipedia Says • “The intent of regression testing is to ensure that a change, such as a bug fix, did not introduce new faults” • AND ALSO to investigate whether the fix addressed the general instance of the problem, or just the specific • AND ALSO to investigate whether there were faults we missed in that area What Wikipedia Says • “One of the main reasons for regression testing is to determine whether a change in one part of the software affects other parts of the software.” • AND ALSO to learn about the relationships between parts of the software, to see where future changes might have other affects • AND ALSO to see how changes in other things affect the system 18
  • 19. What Wikipedia Says • “Regression testing can be used to test a system efficiently by systematically selecting the appropriate minimum set of tests needed to adequately cover a particular change.” • AND ALSO to question the notion of “the appropriate minimum number of tests” • AND ALSO, especially in design, to question our notion of “adequate coverage”. • AND ALSO to increase dramatically the ways in which we could observe the product • But how do you “systematically select”? A Regression Testing Hypothesis • Regression is an important product & project risk • and there are other important risks. • Programmers are working so fast (especially in Agile), there’s a danger of breaking stuff. • Maybe they should maintain a sustainable pace • Maybe they should work more carefully. • Maybe they should work more collaboratively. • Maybe the stuff they’re working on should be less interdependent. – NOTE: testers can identify project risks like these but be careful: we don’t manage the programmers or the project 19
  • 20. A Regression Testing Hypothesis I seem to recall the original XP risk • Regression is an important product & projecttalk putting more • and there are other important risks. emphasis on this • Programmers are working so fast (especially in Agile), stuff. there’s a danger of breaking stuff. • Maybe they should maintain a sustainable pace • Maybe they should work more carefully. • Maybe they should work more collaboratively. • Maybe the stuff they’re working on should be less interdependent. } – NOTE: testers can identify project risks like these but be careful: we don’t manage the programmers or the project A Regression Testing Hypothesis • Breaking stuff that worked before is embarrassing. • Breaking stuff that was broken and fixed before is really embarrassing. • and having bugs that we never noticed at all is also embarrassing • THEREFORE we should focus attention on – tests that we’ve performed before – automated checks – testing after changes • AND ALSO ON – performing new testing that extends coverage, giving – a more comprehensive understanding of the product and – a reasonable chance of identifying regression problems 20
  • 21. Contrasting (and Complementary) Test Strategy Ideas checking passing checks large number of checks noting regression problems detecting regression preventing regression quicker development making sure that our checks are passing testing to search for bugs we anticipate testing checks that trigger questions increasing test coverage noting problems generally preventing regression preventing problems more reliable development making sure that we understand the product testing to learn about the product and new risk ideas Ancient Wisdom One of the lessons to be learned … is that the sheer number of tests performed is of little significance in itself. Too often, the series of tests simply proves how good the computer is at doing the same things with different numbers. As in many instances, we are probably misled here by our experiences with people, whose inherent reliability on repetitive work is at best variable. With a computer program, however, the greater problem is to prove adaptability, something which is not trivial in human functions either. Consequently we must be sure that each test does some work not done by previous tests. To do this, we must struggle to develop a suspicious nature as well as a lively imagination.” Herbert Leeds and Gerald M. Weinberg, Computer Programming Fundamentals, 1961 21
  • 22. Final Ideas • Sort out the difference between regression and repetition. • Regression testing is an airbag that will sometimes protect you. It’s not a substitute for good driving. • Examine the motives for regression testing. • Examine the causes of regression. • Ask how we might detect and prevent regression more quickly, less expensively, more reliably. – checks can be good, and there are other ways • Consider what your testing is telling you – and tell that story. • Think of checking as an element of testing. • Think cost vs. value. • Focus on adaptability, not just repeatability. Questions? Michael Bolton michael@developsense.com http://www.developsense.com Twitter: @michaelbolton Don’t bother with Facebook. Or LinkedIn. 22