Principles of Software Testing: Satzinger, Jackson, and Burd
Principles of Software Testing: Satzinger, Jackson, and Burd
Part I
Satzinger, Jackson, and Burd
Testing
Testing is a process of identifying defects
Develop test cases and test data
A test case is a formal description of
• A starting state
• One or more events to which the software must
respond
• The expected response or ending state
Test data is a set of starting states and events used
to test a module, group of modules, or entire system
Testing discipline activities
Test types and detected defects
Unit Testing
Software Engineering
Symptoms Root Causes
Practices
Needs not met Incorrect requirements Develop Iteratively
Requirements churn Ambiguous communications
Modules don’t fit Brittle architectures Manage Requirements
Hard to maintain Overwhelming complexity
Late discovery Undetected inconsistencies Use Component Architectures
Poor
Poor quality
quality Insufficient testing
Model Visually (UML)
Poor performance Subjective assessment
Colliding developers Waterfall development Continuously Verify Quality
Build-and-release Uncontrolled change
Insufficient automation Manage Change
Software Engineering Practices Reinforce Each Other
Software Engineering
Practices
Develop Iteratively
Validates architectural
Use Component Architectures decisions early on
Field name
Field name
Field name
Review: Core Concepts of Software Testing
What is Quality?
Who are the Stakeholders?
What is a Defect?
What are Dimensions of Quality?
What are Test Ideas?
Where are Test Ideas useful?
Give some examples of a Test Ideas.
Explain how a catalog of Test Ideas could
be applied to a Test Matrix.
Principles of Software Testing for
Testers
Module 4: Define Evaluation Mission
So? Purpose of Testing?
The typical testing group has two key
priorities.
Find the bugs (preferably in priority order).
Assess the condition of the whole product
(as a user will see it).
Sometimes, these conflict
The mission of assessment is the underlying
reason for testing, from management’s
viewpoint. But if you aren’t hammering hard on
the program, you can miss key risks.
Missions of Test Groups Can Vary
Find defects
Maximize bug count
Block premature product releases
Help managers make ship / no-ship decisions
Assess quality
Minimize technical support costs
Conform to regulations
Minimize safety-related lawsuit risk
Assess conformance to specification
Find safe scenarios for use of the product (find ways to
get it to work, in spite of the bugs)
Verify correctness of the product
Assure quality
A Different Take on Mission: Public vs. Private Bugs
A programmer’s public bug rate includes all
bugs left in the code at check-in.
A programmer’s private bug rate includes
all the bugs that are produced, including the
ones fixed before check-in.
Estimates of private bug rates have ranged
from 15 to 150 bugs per 100 statements.
What does this tell us about our task?
Defining the Test Approach
The test approach (or “testing strategy”)
specifies the techniques that will be used to
accomplish the test mission.
The test approach also specifies how the
techniques will be used.
A good test approach is:
Diversified
Risk-focused
Product-specific
Practical
Defensible
Heuristics for Evaluating Testing Approach
James Bach collected a series of heuristics
for evaluating your test approach. For
example, he says:
Testing should be optimized to find important
problems fast, rather than attempting to find all
problems with equal urgency.
Please note that these are heuristics – they
won’t always the best choice for your
context. But in different contexts, you’ll find
different ones very useful.
What Test Documentation Should You Use?
Test planning standards and templates
Examples
Some benefits and costs of using IEEE-829
standard based templates
When are these appropriate?
Thinking about your requirements for test
documentation
Requirements considerations
Questions to elicit information about test
documentation requirements for your project
Write a Purpose Statement for Test Documentation
Try to describe your core documentation
requirements in one sentence that doesn’t
have more than three components.
Examples:
The test documentation set will primarily
support our efforts to find bugs in this version,
to delegate work, and to track status.
The test documentation set will support ongoing
product and test maintenance over at least 10
years, will provide training material for new
group members, and will create archives
suitable for regulatory or litigation use.
Review: Define Evaluation Mission
What is a Test Mission?
What is your Test Mission?
What makes a good Test Approach (Test
Strategy)?
What is a Test Documentation Mission?
What is your Test Documentation Goal?
Principles of Software Testing for
Testers
Module 5: Test & Evaluate
Test and Evaluate – Part One: Test
In this module, we drill into
Test and Evaluate
This addresses the “How?”
question:
How will you test those
things?
Test and Evaluate – Part One: Test
This module focuses
on the activity
Implement Test
Earlier, we covered
Test-Idea Lists, which
are input here
In the next module,
we’ll cover Analyze
Test Failures, the
second half of Test
and Evaluate
Review: Defining the Test Approach
In Module 4, we covered Test Approach
A good test approach is:
Diversified
Risk-focused
Product-specific
Practical
Defensible
The techniques you apply should follow
your test approach
Discussion Exercise 5.1: Test Techniques
There are as many as 200 published testing
techniques. Many of the ideas are
overlapping, but there are common themes.
Similar sounding terms often mean different
things, e.g.:
User testing
Usability testing
User interface testing
What are the differences among these
techniques?
Dimensions of Test Techniques
Think of the testing you do in terms of five
dimensions:
Testers: who does the testing.
Coverage: what gets tested.
Potential problems: why you're testing (what
risk you're testing for).
Activities: how you test.
Evaluation: how to tell whether the test passed
or failed.
Test techniques often focus on one or two
of these, leaving the rest to the skill and
imagination of the tester.
Test Techniques—Dominant Test Approaches
Of the 200+ published Functional Testing techniques,
there are ten basic themes.
They capture the techniques in actual practice.
In this course, we call them:
Function testing
Equivalence analysis
Specification-based testing
Risk-based testing
Stress testing
Regression testing
Exploratory testing
User testing
Scenario testing
Stochastic or Random testing
“So Which Technique Is the Best?”
Each has
strengths and Technique A
weaknesses
Think in Technique H Technique B
terms of Testers
complement Coverage
Technique G Technique C
There is no Potential problems
“one true way” Activities
Technique FEvaluation
Technique D
Mixing
techniques
can improve Technique E
coverage
Apply Techniques According to the LifeCycle
Test Approach changes over the project
Some techniques work well in early phases;
others in later ones
Align the techniques to iteration objectives
Technique H Technique B
Testers
Coverage
TechniquePotential
G Technique C
problems
Activities
TechniqueEvaluation
F Technique D
Technique E
Applying Opposite Techniques to Boost Coverage
Contrast these two techniques
Regression Exploration
Inputs: Inputs:
• Old test cases and • models or other analyses
analyses leading to new that yield new tests
test cases Outputs
Outputs: • scribbles and bug reports
• Archival test cases, Better for:
preferably well • Find new bugs, scout
documented, and bug new areas, risks, or ideas
reports
Better for:
• Reuse across multi-
version products Exploration Regression
Applying Complementary Techniques Together
Regression testing alone suffers fatigue
The bugs get fixed and new runs add little info
Symptom of weak coverage
Combine automation w/ suitable variance
E.g. Risk-based equivalence analysis
Coverage of the combination
can beat sum of the parts Equivalence
Risk-based
Regression
How To Adopt New Techniques
1. Answer these questions:
What techniques do you use in your test approach
now?
What is its greatest shortcoming?
What one technique could you add to make the
greatest improvement, consistent with a good test
approach:
• Risk-focused?
• Product-specific?
• Practical?
• Defensible?
2. Apply that additional technique until proficient
3. Iterate