SlideShare a Scribd company logo
TC
AM Tutorial
10/14/2014 8:30:00 AM
"Fundamental Test Design Techniques"
Presented by:
Lee Copeland
Software Quality Engineering
Brought to you by:
340 Corporate Way, Suite 300, Orange Park, FL 32073
888-268-8770 ∙ 904-278-0524 ∙ sqeinfo@sqe.com ∙ www.sqe.com
Lee Copeland
Software Quality Engineering
With more than thirty years of experience as an information systems professional at commercial
and nonprofit organizations, Lee Copeland has held technical and managerial positions in
applications development, software testing, and software process improvement. At Software
Quality Engineering, Lee has developed and taught numerous training courses on software
development and testing issues, and is a sought-after speaker at software conferences in the
United States and abroad. Lee presents at software conferences in the United States and
abroad. He is the author of the popular reference book, A Practitioner’s Guide to Software Test
Design.
Mastering Test Design V 3.2 © SQE 2001-2006 1
Mastering Test Design V 3.2 © SQE 2001-2006 2
Mastering Test Design V 3.2 © SQE 2001-2006 3
Mastering Test Design V 3.2 © SQE 2001-2006 4
Mastering Test Design V 3.2 © SQE 2001-2006 5
Mastering Test Design V 3.2 © SQE 2001-2006 6
Mastering Test Design V 3.2 © SQE 2001-2006 7
This is the definition for “test” from IEEE Std 610, which is a dictionary of
technical terms related to software. It is both a verb and a noun.
Mastering Test Design V 3.2 © SQE 2001-2006 8
technical terms related to software. It is both a verb and a noun.
This and all other IEEE Software Engineering Standards are available from
computer.org (ieee.org is for all IEEE standards, including many related to
hardware. It has a link to the Computer Society’s site, which is where the
software related standards are found.
Mastering Test Design V 3.2 © SQE 2001-2006 9
Mastering Test Design V 3.2 © SQE 2001-2006 10
Mastering Test Design V 3.2 © SQE 2001-2006 11
The definition of what constitutes a “test case” varies. This is the definition for
purposes of this class. It includes everything needed to execute the test in a
Mastering Test Design V 3.2 © SQE 2001-2006 12
purposes of this class. It includes everything needed to execute the test in a
reproducible fashion, which includes:
• One or more data values which are to be input
• The trigger event that starts the test
• One or more data values which will be generated as a result of the input(s)
being processed (the output)
• The tools and data required to allow the test to execute (the environment)
• The order in which the tests are to be run
Often, the only inputs considered are those entered through the user interface.
In reality, there are often many other inputs.
Mastering Test Design V 3.2 © SQE 2001-2006 13
In reality, there are often many other inputs.
Outputs are just as varied as inputs.
Mastering Test Design V 3.2 © SQE 2001-2006 14
Testing every possible data value, every possible navigation path through the
code, or every possible combination of input values is almost always an infinite
Mastering Test Design V 3.2 © SQE 2001-2006 15
code, or every possible combination of input values is almost always an infinite
task which is impossible to complete. Even if it were possible, it is not a good
idea because many of the test cases would be redundant, consume resources
to create, delay time to market, and not add anything of value.
Since it is impossible to test everything, the coverage is based on trade-offs,
considering factors such as the following:
Mastering Test Design V 3.2 © SQE 2001-2006 16
considering factors such as the following:
• How much time is available to prepare and/or execute tests
• The most cost-effective approach in terms of the return on the investment
• Priorities based on risk (test more of higher risk)
• Use tools when appropriate
• Find as many defects as possible in the time available
This series of sections is the heart of the tutorial.
This chapter includes the “scientific” methods—the ones with definitions and
Mastering Test Design V 3.2 © SQE 2001-2006 17
This chapter includes the “scientific” methods—the ones with definitions and
specific ways for selecting test data. It is the largest and most comprehensive
chapter in the tutorial. It is followed by white box or structure based tests. The
last chapter in this section will address the “creative” (not structured) ways of
testing.
Mastering Test Design V 3.2 © SQE 2001-2006 18
Each of these techniques has certain capabilities and limitations.There are
some types of defects/problems that each technique can detect and there are
Mastering Test Design V 3.2 © SQE 2001-2006 19
some types of defects/problems that each technique can detect and there are
some things that the individual techniques are not designed to detect. By
combining several techniques the individual strengths can be used to offset the
weaknesses.
Mastering Test Design V 3.2 © SQE 2001-2006 20
The techniques presented in this chapter apply to all levels of test—from a
single unit to many interfacing systems.The common factor is the emphasis on
Mastering Test Design V 3.2 © SQE 2001-2006 21
single unit to many interfacing systems.The common factor is the emphasis on
input data ranges.
Mastering Test Design V 3.2 © SQE 2001-2006 22
Mastering Test Design V 3.2 © SQE 2001-2006 23
There are four basic rules to defining equivalence classes. These are noted
here and on the next slide.
Mastering Test Design V 3.2 © SQE 2001-2006 24
here and on the next slide.
Depending on the complexity of the input it may also be necessary to subdivide
a partition into smaller partitions. Although the need to subdivide may be
predicated on what the set of values for a partition is.
For example:
The invalid partitions above may also contain alphabetic or special
characters and possibly negative numbers. These particular values can
be used in either invalid partition, essentially subdividing that partition into
four groups: Numeric, negative numeric, alphabetic and special
character.
Whether you do this subdivision or not is up to the tester. It may not be
necessary as these are actually “field type” tests and could be done as a
separate test depending on how the fields are created for the user interface.
If a developers kit is used to define the fields a single test of the kit for
these events may be sufficient.
You can also define classes for outputs as well as inputs.
Mastering Test Design V 3.2 © SQE 2001-2006 25
You can also define classes for outputs as well as inputs.
Mastering Test Design V 3.2 © SQE 2001-2006 26
Mastering Test Design V 3.2 © SQE 2001-2006 27
Although the technique focuses on one requirement at a time it is permissible to
create test cases looking at all the requirements as a set. This will reduce the
Mastering Test Design V 3.2 © SQE 2001-2006 28
create test cases looking at all the requirements as a set. This will reduce the
number of test required to validate the requirements under analysis.
If we were to write test to validate each individual requirement the number of
tests could increase substantially, especially if many requirements are involved.
Most will note that these are not the “best” test cases.The key is to define the
“minimum” number of tests required to test the requirements “partitions.”
Mastering Test Design V 3.2 © SQE 2001-2006 29
“minimum” number of tests required to test the requirements “partitions.”
By combining requirements together it takes one test to check all the valid
partitions and six to test all the invalid partitions. We have to test invalids
individually because we do not know how the developer coded the error
handling (this is black box) and it is possible that the first error could stop the
test. Later, if we discover the developer uses a table (or similar construct) to
show all errors, we can combine the error tests as we did the valid tests.
One of the key reasons to do Equivalence Partitioning is to locate the
boundaries. If developers are going to make a mistake they will probably do it at
Mastering Test Design V 3.2 © SQE 2001-2006 30
boundaries. If developers are going to make a mistake they will probably do it at
a boundary.
As noted sets are different. To ensure the set is complete and defined correctly
each member of the set is tested to ensure the set is coded correctly as they
Mastering Test Design V 3.2 © SQE 2001-2006 31
each member of the set is tested to ensure the set is coded correctly as they
don’t actually have a boundary. So the third valid test is for the type of property
variable. You can choose any valid value for the other partitions.
These values do a better job of testing the partitions and the boundaries of the
partitions. You will notice that by focusing on multiple inputs together (four
corners) we don’t actually increase the number of tests but make them more
effective.
Invalids must still be tested individually for the same reasons previously noted.
Mastering Test Design V 3.2 © SQE 2001-2006 32
Mastering Test Design V 3.2 © SQE 2001-2006 33
Mastering Test Design V 3.2 © SQE 2001-2006 34
The ground rule would be to have every test include (“cross”) at least three
functional areas. For example, Test 1 includes Remote Application 1, Mail
Mastering Test Design V 3.2 © SQE 2001-2006 35
functional areas. For example, Test 1 includes Remote Application 1, Mail
server 1, and the User interface. Test 3 crosses five functional areas.
Mastering Test Design V 3.2 © SQE 2001-2006 36
Conditions “1” through “X” show the allowed input conditions
Mastering Test Design V 3.2 © SQE 2001-2006 37
Actions “1” through “Z” are the actions that will be taken based on combinations
of conditions.
Each Rule defines a unique set of conditions that result in the indicated set of
actions taking effect. Actions do not care about the order of the conditions or the
order in which they are checked, the key is their combined values.
Conditions that are simply yes or no events, binary decisions, are very easy to
map to a decision table.
Mastering Test Design V 3.2 © SQE 2001-2006 38
map to a decision table.
You’ll notice that rules one and two contain a “immaterial” condition. The
“Unearned income >$1560” has no affect on the resulting action. Technically we
could ignore this value in testing, however, if we did how could we be sure that it
did not alter the outcome/action?
If claims and age are valid, then the three actions will be applied accordingly.
Mastering Test Design V 3.2 © SQE 2001-2006 39
If claims or age is invalid, there is no action to take. In fact it is “impossible” to
have an invalid claim. If you enter a negative number this would be a “field type”
test and in reality you would not file a “negative” claim. All claims above 5 are
treated the same, no matter how many.
As noted earlier, you may have a license and be over 85 or under 16 but this
application does not accept those values and would generate an error. If we
wanted to we could add a fourth action, generate error message.
Here is where we can combine techniques.
Using EP/BV and four corners, we can reduce the number of tests required for
Mastering Test Design V 3.2 © SQE 2001-2006 40
Using EP/BV and four corners, we can reduce the number of tests required for
each rule.
• The lower boundary value of all but Rule 1 puts you into another rule.
• The upper boundary value of all but Rule 8 puts you into another rule.
Mastering Test Design V 3.2 © SQE 2001-2006 41
This is a simplified diagram for making an airline reservation.
Mastering Test Design V 3.2 © SQE 2001-2006 42
After each user activity “event,” the system/application is in some “state.” It is
this state that will affect what the requestor can or cannot do next. To test this
process, you need to know how to perform each activity, what the acceptable
pathways are supposed to be, and the business rules that apply, before, during
and after each state and event.
This type of diagram helps you plan your functional testing to ensure you not
only exercise the functions of the systems but also check the system/design
itself.
Mastering Test Design V 3.2 © SQE 2001-2006 43
Mastering Test Design V 3.2 © SQE 2001-2006 44
Trace Matrices can support multiple levels. This is an example of a four level
matrix.
Mastering Test Design V 3.2 © SQE 2001-2006 45
matrix.
This is an example of a Traceability Matrix linking requirements to design. It can
be used for any predecessor/successor pair of documents. It can also be used
Mastering Test Design V 3.2 © SQE 2001-2006 46
be used for any predecessor/successor pair of documents. It can also be used
to document any requirements which are NOT going to be addressed by the
tests. Some useful optional additional columns:
• Comments: any questions, assumptions, etc.
• Priority: the importance of the requirement (with the implication that the
lower rated ones have less tests which may not even get run when time
is short).
This is a summary of the techniques in this section vs. the possible applicable
levels of Black Box testing. It is not intended in any sense to be restrictive - use
Mastering Test Design V 3.2 © SQE 2001-2006 47
levels of Black Box testing. It is not intended in any sense to be restrictive - use
whatever works in your environment.
Mastering Test Design V 3.2 © SQE 2001-2006 48
This is the last of the Test Design Techniques sections. It includes some very
interesting tests - those which are NOT based on a logically structured
Mastering Test Design V 3.2 © SQE 2001-2006 49
interesting tests - those which are NOT based on a logically structured
technique!
Mastering Test Design V 3.2 © SQE 2001-2006 50
Mastering Test Design V 3.2 © SQE 2001-2006 51
All of the scientific techniques in the last two chapters are of great value, but
there is still more needed. Since the programming field tends to attract people
Mastering Test Design V 3.2 © SQE 2001-2006 52
there is still more needed. Since the programming field tends to attract people
who are very logical, it is helpful to have someone—who can do the illogical—
test the system, too. After the system is in production, real circumstances will
not be constrained to only logical processes, so it is good to test them before
the system goes into use.
All of the scientific techniques in the last two chapters are of great value, but
there is still more needed. Since the programming field tends to attract people
Mastering Test Design V 3.2 © SQE 2001-2006 53
there is still more needed. Since the programming field tends to attract people
who are very logical, it is helpful to have someone—who can do the illogical—
test the system, too. After the system is in production, real circumstances will
not be constrained to only logical processes, so it is good to test them before
the system goes into use.
This is a talent that some people have, and some don’t (the author of this
course is a “don’t”). Some people can just walk up to a system, take one look at
Mastering Test Design V 3.2 © SQE 2001-2006 54
course is a “don’t”). Some people can just walk up to a system, take one look at
it, and say, “I bet if I do this it will break,” and be right! It is great for a testing
team to have people with this kind of talent participating.
Mastering Test Design V 3.2 © SQE 2001-2006 55
One of many excellent James Bach quotes!
Mastering Test Design V 3.2 © SQE 2001-2006 56
Mastering Test Design V 3.2 © SQE 2001-2006 57
This is a formalization of what many testers have been doing for a long time.
Even with specifications, testers rarely have all of the information they really
Mastering Test Design V 3.2 © SQE 2001-2006 58
Even with specifications, testers rarely have all of the information they really
need. And not everyone gets a complete set—or sometimes any—
specifications!
James Bach, the leader in this field, is researching and working on quantifying
what a good tester does when confronted with unproven software and not
enough information.
These are the basic steps for exploratory testing, which consists of starting with
whatever we know and going forward in a constructive manner. This is based on
Mastering Test Design V 3.2 © SQE 2001-2006 59
whatever we know and going forward in a constructive manner. This is based on
James Bach’s description of the process.
The last category has no bounds at all. Just do the tests totally illogically!
Mastering Test Design V 3.2 © SQE 2001-2006 60
Mastering Test Design V 3.2 © SQE 2001-2006 61
Mastering Test Design V 3.2 © SQE 2001-2006 62
Mastering Test Design V 3.2 © SQE 2001-2006 63
Mastering Test Design V 3.2 © SQE 2001-2006 64
Mastering Test Design V 3.2 © SQE 2001-2006 65
These slides on Taxonomies are based on information, provided by James Bach
and Cem Kaner in their course on “black box testing” and from Lee Copeland’s
Mastering Test Design V 3.2 © SQE 2001-2006 66
and Cem Kaner in their course on “black box testing” and from Lee Copeland’s
book, A Practitioner’s Guide to Software Test Design.
These are sources for some example Taxonomies
Mastering Test Design V 3.2 © SQE 2001-2006 67
These are sources for some example Taxonomies
Mastering Test Design V 3.2 © SQE 2001-2006 68
This is Boris Beizer’s high level taxonomy for where defects can occur.
Mastering Test Design V 3.2 © SQE 2001-2006 69
You may want to build a similar taxonomy based on your applications and
systems. You can use one of the samples noted to get started.
Mastering Test Design V 3.2 © SQE 2001-2006 70
Even considering the top two levels, it is quite extensive. All four levels of the
taxonomy constitute a fine grained framework on which to categorize defects.
Mastering Test Design V 3.2 © SQE 2001-2006 71
taxonomy constitute a fine grained framework on which to categorize defects.
Mastering Test Design V 3.2 © SQE 2001-2006 72
Mastering Test Design V 3.2 © SQE 2001-2006 73
Mastering Test Design V 3.2 © SQE 2001-2006 74
Your instructor will review which parts of the class helped with the challenges
identified in the beginning of the course.
Mastering Test Design V 3.2 © SQE 2001-2006 75
identified in the beginning of the course.
Mastering Test Design V 3.2 © SQE 2001-2006 76
Some suggestions for your evaluations!
Mastering Test Design V 3.2 © SQE 2001-2006 77
Mastering Test Design V 3.2 © SQE 2001-2006 78
Hope this class really helped!
Mastering Test Design V 3.2 © SQE 2001-2006 79

More Related Content

PPTX
Test design techniques: Structured and Experienced-based techniques
PPT
Test design techniques
PPTX
Test design techniques
PPTX
Test case techniques
PPT
Testing Fundamentals
PPTX
Test design techniques
PDF
Test design techniques
PPT
Software Testing Techniques
Test design techniques: Structured and Experienced-based techniques
Test design techniques
Test design techniques
Test case techniques
Testing Fundamentals
Test design techniques
Test design techniques
Software Testing Techniques

What's hot (20)

PPT
Design Test Case Technique (Equivalence partitioning And Boundary value analy...
PPTX
Boundary value analysis and equivalence partitioning
PPTX
Test Case Design and Technique
PPTX
Software Testing Foundations Part 6 - Intuitive and Experience-based testing
PDF
Whitepaper Test Case Design and Testing Techniques- Factors to Consider
PPTX
Black Box Testing
PPT
Software Testing Techniques
PPTX
Black box testing or behavioral testing
PPTX
Blackbox
PPTX
Equivalence partinioning and boundary value analysis
PPS
Boundary and equivalnce systematic test design
PPTX
Software Testing Foundations Part 4 - Black Box Testing
PPT
Black box testing
PPT
Dynamic analysis in Software Testing
DOC
Black box testing
PPTX
Unit 2 - Test Case Design
PPT
Software Quality Testing
PPT
Test design techniques
PPTX
Test Case Design
PPTX
5 black box and grey box testing
Design Test Case Technique (Equivalence partitioning And Boundary value analy...
Boundary value analysis and equivalence partitioning
Test Case Design and Technique
Software Testing Foundations Part 6 - Intuitive and Experience-based testing
Whitepaper Test Case Design and Testing Techniques- Factors to Consider
Black Box Testing
Software Testing Techniques
Black box testing or behavioral testing
Blackbox
Equivalence partinioning and boundary value analysis
Boundary and equivalnce systematic test design
Software Testing Foundations Part 4 - Black Box Testing
Black box testing
Dynamic analysis in Software Testing
Black box testing
Unit 2 - Test Case Design
Software Quality Testing
Test design techniques
Test Case Design
5 black box and grey box testing
Ad

Viewers also liked (13)

PDF
Leading Internationally-Distributed Test Teams
PDF
Root Cause Analysis for Software Testers
PDF
Exploratory Testing Is Now in Session
PDF
Soft Skills You Need Are Not Always Taught in Class
PDF
Alan Page: On Testing
PDF
The Show Must Go On: Leadership Lessons from the Theater
PDF
Impersonal Leadership Is Dead: Be Courageous and Connect
PDF
Automation through the Back Door
PDF
Continuous Delivery: Never Send a Human to Do a Machine’s Job
PDF
From Waterfall to Agile: A ScrumMaster’s View
PDF
Application Performance Testing: A Simplified Universal Approach
PDF
Rejuvenate Your Scrum Implementation: From Good to Great
PDF
Requirements Are Simply Requirements—or Maybe Not
Leading Internationally-Distributed Test Teams
Root Cause Analysis for Software Testers
Exploratory Testing Is Now in Session
Soft Skills You Need Are Not Always Taught in Class
Alan Page: On Testing
The Show Must Go On: Leadership Lessons from the Theater
Impersonal Leadership Is Dead: Be Courageous and Connect
Automation through the Back Door
Continuous Delivery: Never Send a Human to Do a Machine’s Job
From Waterfall to Agile: A ScrumMaster’s View
Application Performance Testing: A Simplified Universal Approach
Rejuvenate Your Scrum Implementation: From Good to Great
Requirements Are Simply Requirements—or Maybe Not
Ad

Similar to Fundamental Test Design Techniques (20)

PDF
Key Test Design Techniques
PDF
Key Test Design Techniques
PDF
Key Test Design Techniques
PPTX
dynamic testing for polytechnic students
PDF
Black Box Testing.pdf
PPTX
Test Design For Everyone
PPTX
Software Testing strategies, their types and Levels
PPT
Software engineering Testing technique,test case,test suit design
PPT
Introduction to software testing
PDF
Essential Test Management and Planning
PPT
Testing
PPT
Software Testing
PPTX
Essential Test Management
PPT
ISTQB / ISEB Foundation Exam Practice - 2
PPT
Unit 6
PPT
Test data documentation ss
PPT
Unit testing
PPTX
Test design techniques
Key Test Design Techniques
Key Test Design Techniques
Key Test Design Techniques
dynamic testing for polytechnic students
Black Box Testing.pdf
Test Design For Everyone
Software Testing strategies, their types and Levels
Software engineering Testing technique,test case,test suit design
Introduction to software testing
Essential Test Management and Planning
Testing
Software Testing
Essential Test Management
ISTQB / ISEB Foundation Exam Practice - 2
Unit 6
Test data documentation ss
Unit testing
Test design techniques

More from TechWell (20)

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

Recently uploaded (20)

PDF
WOOl fibre morphology and structure.pdf for textiles
PPTX
observCloud-Native Containerability and monitoring.pptx
PPTX
Tartificialntelligence_presentation.pptx
PDF
A Late Bloomer's Guide to GenAI: Ethics, Bias, and Effective Prompting - Boha...
PDF
Transform Your ITIL® 4 & ITSM Strategy with AI in 2025.pdf
PPT
What is a Computer? Input Devices /output devices
PPTX
Chapter 5: Probability Theory and Statistics
PPTX
MicrosoftCybserSecurityReferenceArchitecture-April-2025.pptx
PDF
STKI Israel Market Study 2025 version august
PDF
Zenith AI: Advanced Artificial Intelligence
PDF
From MVP to Full-Scale Product A Startup’s Software Journey.pdf
PDF
sustainability-14-14877-v2.pddhzftheheeeee
PDF
Unlock new opportunities with location data.pdf
PDF
Hindi spoken digit analysis for native and non-native speakers
PDF
How ambidextrous entrepreneurial leaders react to the artificial intelligence...
PDF
1 - Historical Antecedents, Social Consideration.pdf
PDF
Assigned Numbers - 2025 - Bluetooth® Document
PDF
Video forgery: An extensive analysis of inter-and intra-frame manipulation al...
PDF
August Patch Tuesday
PDF
A review of recent deep learning applications in wood surface defect identifi...
WOOl fibre morphology and structure.pdf for textiles
observCloud-Native Containerability and monitoring.pptx
Tartificialntelligence_presentation.pptx
A Late Bloomer's Guide to GenAI: Ethics, Bias, and Effective Prompting - Boha...
Transform Your ITIL® 4 & ITSM Strategy with AI in 2025.pdf
What is a Computer? Input Devices /output devices
Chapter 5: Probability Theory and Statistics
MicrosoftCybserSecurityReferenceArchitecture-April-2025.pptx
STKI Israel Market Study 2025 version august
Zenith AI: Advanced Artificial Intelligence
From MVP to Full-Scale Product A Startup’s Software Journey.pdf
sustainability-14-14877-v2.pddhzftheheeeee
Unlock new opportunities with location data.pdf
Hindi spoken digit analysis for native and non-native speakers
How ambidextrous entrepreneurial leaders react to the artificial intelligence...
1 - Historical Antecedents, Social Consideration.pdf
Assigned Numbers - 2025 - Bluetooth® Document
Video forgery: An extensive analysis of inter-and intra-frame manipulation al...
August Patch Tuesday
A review of recent deep learning applications in wood surface defect identifi...

Fundamental Test Design Techniques

  • 1. TC AM Tutorial 10/14/2014 8:30:00 AM "Fundamental Test Design Techniques" Presented by: Lee Copeland Software Quality Engineering Brought to you by: 340 Corporate Way, Suite 300, Orange Park, FL 32073 888-268-8770 ∙ 904-278-0524 ∙ sqeinfo@sqe.com ∙ www.sqe.com
  • 2. Lee Copeland Software Quality Engineering With more than thirty years of experience as an information systems professional at commercial and nonprofit organizations, Lee Copeland has held technical and managerial positions in applications development, software testing, and software process improvement. At Software Quality Engineering, Lee has developed and taught numerous training courses on software development and testing issues, and is a sought-after speaker at software conferences in the United States and abroad. Lee presents at software conferences in the United States and abroad. He is the author of the popular reference book, A Practitioner’s Guide to Software Test Design.
  • 3. Mastering Test Design V 3.2 © SQE 2001-2006 1
  • 4. Mastering Test Design V 3.2 © SQE 2001-2006 2
  • 5. Mastering Test Design V 3.2 © SQE 2001-2006 3
  • 6. Mastering Test Design V 3.2 © SQE 2001-2006 4
  • 7. Mastering Test Design V 3.2 © SQE 2001-2006 5
  • 8. Mastering Test Design V 3.2 © SQE 2001-2006 6
  • 9. Mastering Test Design V 3.2 © SQE 2001-2006 7
  • 10. This is the definition for “test” from IEEE Std 610, which is a dictionary of technical terms related to software. It is both a verb and a noun. Mastering Test Design V 3.2 © SQE 2001-2006 8 technical terms related to software. It is both a verb and a noun. This and all other IEEE Software Engineering Standards are available from computer.org (ieee.org is for all IEEE standards, including many related to hardware. It has a link to the Computer Society’s site, which is where the software related standards are found.
  • 11. Mastering Test Design V 3.2 © SQE 2001-2006 9
  • 12. Mastering Test Design V 3.2 © SQE 2001-2006 10
  • 13. Mastering Test Design V 3.2 © SQE 2001-2006 11
  • 14. The definition of what constitutes a “test case” varies. This is the definition for purposes of this class. It includes everything needed to execute the test in a Mastering Test Design V 3.2 © SQE 2001-2006 12 purposes of this class. It includes everything needed to execute the test in a reproducible fashion, which includes: • One or more data values which are to be input • The trigger event that starts the test • One or more data values which will be generated as a result of the input(s) being processed (the output) • The tools and data required to allow the test to execute (the environment) • The order in which the tests are to be run
  • 15. Often, the only inputs considered are those entered through the user interface. In reality, there are often many other inputs. Mastering Test Design V 3.2 © SQE 2001-2006 13 In reality, there are often many other inputs.
  • 16. Outputs are just as varied as inputs. Mastering Test Design V 3.2 © SQE 2001-2006 14
  • 17. Testing every possible data value, every possible navigation path through the code, or every possible combination of input values is almost always an infinite Mastering Test Design V 3.2 © SQE 2001-2006 15 code, or every possible combination of input values is almost always an infinite task which is impossible to complete. Even if it were possible, it is not a good idea because many of the test cases would be redundant, consume resources to create, delay time to market, and not add anything of value.
  • 18. Since it is impossible to test everything, the coverage is based on trade-offs, considering factors such as the following: Mastering Test Design V 3.2 © SQE 2001-2006 16 considering factors such as the following: • How much time is available to prepare and/or execute tests • The most cost-effective approach in terms of the return on the investment • Priorities based on risk (test more of higher risk) • Use tools when appropriate • Find as many defects as possible in the time available
  • 19. This series of sections is the heart of the tutorial. This chapter includes the “scientific” methods—the ones with definitions and Mastering Test Design V 3.2 © SQE 2001-2006 17 This chapter includes the “scientific” methods—the ones with definitions and specific ways for selecting test data. It is the largest and most comprehensive chapter in the tutorial. It is followed by white box or structure based tests. The last chapter in this section will address the “creative” (not structured) ways of testing.
  • 20. Mastering Test Design V 3.2 © SQE 2001-2006 18
  • 21. Each of these techniques has certain capabilities and limitations.There are some types of defects/problems that each technique can detect and there are Mastering Test Design V 3.2 © SQE 2001-2006 19 some types of defects/problems that each technique can detect and there are some things that the individual techniques are not designed to detect. By combining several techniques the individual strengths can be used to offset the weaknesses.
  • 22. Mastering Test Design V 3.2 © SQE 2001-2006 20
  • 23. The techniques presented in this chapter apply to all levels of test—from a single unit to many interfacing systems.The common factor is the emphasis on Mastering Test Design V 3.2 © SQE 2001-2006 21 single unit to many interfacing systems.The common factor is the emphasis on input data ranges.
  • 24. Mastering Test Design V 3.2 © SQE 2001-2006 22
  • 25. Mastering Test Design V 3.2 © SQE 2001-2006 23
  • 26. There are four basic rules to defining equivalence classes. These are noted here and on the next slide. Mastering Test Design V 3.2 © SQE 2001-2006 24 here and on the next slide. Depending on the complexity of the input it may also be necessary to subdivide a partition into smaller partitions. Although the need to subdivide may be predicated on what the set of values for a partition is. For example: The invalid partitions above may also contain alphabetic or special characters and possibly negative numbers. These particular values can be used in either invalid partition, essentially subdividing that partition into four groups: Numeric, negative numeric, alphabetic and special character. Whether you do this subdivision or not is up to the tester. It may not be necessary as these are actually “field type” tests and could be done as a separate test depending on how the fields are created for the user interface. If a developers kit is used to define the fields a single test of the kit for these events may be sufficient.
  • 27. You can also define classes for outputs as well as inputs. Mastering Test Design V 3.2 © SQE 2001-2006 25
  • 28. You can also define classes for outputs as well as inputs. Mastering Test Design V 3.2 © SQE 2001-2006 26
  • 29. Mastering Test Design V 3.2 © SQE 2001-2006 27
  • 30. Although the technique focuses on one requirement at a time it is permissible to create test cases looking at all the requirements as a set. This will reduce the Mastering Test Design V 3.2 © SQE 2001-2006 28 create test cases looking at all the requirements as a set. This will reduce the number of test required to validate the requirements under analysis. If we were to write test to validate each individual requirement the number of tests could increase substantially, especially if many requirements are involved.
  • 31. Most will note that these are not the “best” test cases.The key is to define the “minimum” number of tests required to test the requirements “partitions.” Mastering Test Design V 3.2 © SQE 2001-2006 29 “minimum” number of tests required to test the requirements “partitions.” By combining requirements together it takes one test to check all the valid partitions and six to test all the invalid partitions. We have to test invalids individually because we do not know how the developer coded the error handling (this is black box) and it is possible that the first error could stop the test. Later, if we discover the developer uses a table (or similar construct) to show all errors, we can combine the error tests as we did the valid tests.
  • 32. One of the key reasons to do Equivalence Partitioning is to locate the boundaries. If developers are going to make a mistake they will probably do it at Mastering Test Design V 3.2 © SQE 2001-2006 30 boundaries. If developers are going to make a mistake they will probably do it at a boundary.
  • 33. As noted sets are different. To ensure the set is complete and defined correctly each member of the set is tested to ensure the set is coded correctly as they Mastering Test Design V 3.2 © SQE 2001-2006 31 each member of the set is tested to ensure the set is coded correctly as they don’t actually have a boundary. So the third valid test is for the type of property variable. You can choose any valid value for the other partitions. These values do a better job of testing the partitions and the boundaries of the partitions. You will notice that by focusing on multiple inputs together (four corners) we don’t actually increase the number of tests but make them more effective. Invalids must still be tested individually for the same reasons previously noted.
  • 34. Mastering Test Design V 3.2 © SQE 2001-2006 32
  • 35. Mastering Test Design V 3.2 © SQE 2001-2006 33
  • 36. Mastering Test Design V 3.2 © SQE 2001-2006 34
  • 37. The ground rule would be to have every test include (“cross”) at least three functional areas. For example, Test 1 includes Remote Application 1, Mail Mastering Test Design V 3.2 © SQE 2001-2006 35 functional areas. For example, Test 1 includes Remote Application 1, Mail server 1, and the User interface. Test 3 crosses five functional areas.
  • 38. Mastering Test Design V 3.2 © SQE 2001-2006 36
  • 39. Conditions “1” through “X” show the allowed input conditions Mastering Test Design V 3.2 © SQE 2001-2006 37 Actions “1” through “Z” are the actions that will be taken based on combinations of conditions. Each Rule defines a unique set of conditions that result in the indicated set of actions taking effect. Actions do not care about the order of the conditions or the order in which they are checked, the key is their combined values.
  • 40. Conditions that are simply yes or no events, binary decisions, are very easy to map to a decision table. Mastering Test Design V 3.2 © SQE 2001-2006 38 map to a decision table. You’ll notice that rules one and two contain a “immaterial” condition. The “Unearned income >$1560” has no affect on the resulting action. Technically we could ignore this value in testing, however, if we did how could we be sure that it did not alter the outcome/action?
  • 41. If claims and age are valid, then the three actions will be applied accordingly. Mastering Test Design V 3.2 © SQE 2001-2006 39 If claims or age is invalid, there is no action to take. In fact it is “impossible” to have an invalid claim. If you enter a negative number this would be a “field type” test and in reality you would not file a “negative” claim. All claims above 5 are treated the same, no matter how many. As noted earlier, you may have a license and be over 85 or under 16 but this application does not accept those values and would generate an error. If we wanted to we could add a fourth action, generate error message.
  • 42. Here is where we can combine techniques. Using EP/BV and four corners, we can reduce the number of tests required for Mastering Test Design V 3.2 © SQE 2001-2006 40 Using EP/BV and four corners, we can reduce the number of tests required for each rule. • The lower boundary value of all but Rule 1 puts you into another rule. • The upper boundary value of all but Rule 8 puts you into another rule.
  • 43. Mastering Test Design V 3.2 © SQE 2001-2006 41
  • 44. This is a simplified diagram for making an airline reservation. Mastering Test Design V 3.2 © SQE 2001-2006 42 After each user activity “event,” the system/application is in some “state.” It is this state that will affect what the requestor can or cannot do next. To test this process, you need to know how to perform each activity, what the acceptable pathways are supposed to be, and the business rules that apply, before, during and after each state and event. This type of diagram helps you plan your functional testing to ensure you not only exercise the functions of the systems but also check the system/design itself.
  • 45. Mastering Test Design V 3.2 © SQE 2001-2006 43
  • 46. Mastering Test Design V 3.2 © SQE 2001-2006 44
  • 47. Trace Matrices can support multiple levels. This is an example of a four level matrix. Mastering Test Design V 3.2 © SQE 2001-2006 45 matrix.
  • 48. This is an example of a Traceability Matrix linking requirements to design. It can be used for any predecessor/successor pair of documents. It can also be used Mastering Test Design V 3.2 © SQE 2001-2006 46 be used for any predecessor/successor pair of documents. It can also be used to document any requirements which are NOT going to be addressed by the tests. Some useful optional additional columns: • Comments: any questions, assumptions, etc. • Priority: the importance of the requirement (with the implication that the lower rated ones have less tests which may not even get run when time is short).
  • 49. This is a summary of the techniques in this section vs. the possible applicable levels of Black Box testing. It is not intended in any sense to be restrictive - use Mastering Test Design V 3.2 © SQE 2001-2006 47 levels of Black Box testing. It is not intended in any sense to be restrictive - use whatever works in your environment.
  • 50. Mastering Test Design V 3.2 © SQE 2001-2006 48
  • 51. This is the last of the Test Design Techniques sections. It includes some very interesting tests - those which are NOT based on a logically structured Mastering Test Design V 3.2 © SQE 2001-2006 49 interesting tests - those which are NOT based on a logically structured technique!
  • 52. Mastering Test Design V 3.2 © SQE 2001-2006 50
  • 53. Mastering Test Design V 3.2 © SQE 2001-2006 51
  • 54. All of the scientific techniques in the last two chapters are of great value, but there is still more needed. Since the programming field tends to attract people Mastering Test Design V 3.2 © SQE 2001-2006 52 there is still more needed. Since the programming field tends to attract people who are very logical, it is helpful to have someone—who can do the illogical— test the system, too. After the system is in production, real circumstances will not be constrained to only logical processes, so it is good to test them before the system goes into use.
  • 55. All of the scientific techniques in the last two chapters are of great value, but there is still more needed. Since the programming field tends to attract people Mastering Test Design V 3.2 © SQE 2001-2006 53 there is still more needed. Since the programming field tends to attract people who are very logical, it is helpful to have someone—who can do the illogical— test the system, too. After the system is in production, real circumstances will not be constrained to only logical processes, so it is good to test them before the system goes into use.
  • 56. This is a talent that some people have, and some don’t (the author of this course is a “don’t”). Some people can just walk up to a system, take one look at Mastering Test Design V 3.2 © SQE 2001-2006 54 course is a “don’t”). Some people can just walk up to a system, take one look at it, and say, “I bet if I do this it will break,” and be right! It is great for a testing team to have people with this kind of talent participating.
  • 57. Mastering Test Design V 3.2 © SQE 2001-2006 55
  • 58. One of many excellent James Bach quotes! Mastering Test Design V 3.2 © SQE 2001-2006 56
  • 59. Mastering Test Design V 3.2 © SQE 2001-2006 57
  • 60. This is a formalization of what many testers have been doing for a long time. Even with specifications, testers rarely have all of the information they really Mastering Test Design V 3.2 © SQE 2001-2006 58 Even with specifications, testers rarely have all of the information they really need. And not everyone gets a complete set—or sometimes any— specifications! James Bach, the leader in this field, is researching and working on quantifying what a good tester does when confronted with unproven software and not enough information.
  • 61. These are the basic steps for exploratory testing, which consists of starting with whatever we know and going forward in a constructive manner. This is based on Mastering Test Design V 3.2 © SQE 2001-2006 59 whatever we know and going forward in a constructive manner. This is based on James Bach’s description of the process.
  • 62. The last category has no bounds at all. Just do the tests totally illogically! Mastering Test Design V 3.2 © SQE 2001-2006 60
  • 63. Mastering Test Design V 3.2 © SQE 2001-2006 61
  • 64. Mastering Test Design V 3.2 © SQE 2001-2006 62
  • 65. Mastering Test Design V 3.2 © SQE 2001-2006 63
  • 66. Mastering Test Design V 3.2 © SQE 2001-2006 64
  • 67. Mastering Test Design V 3.2 © SQE 2001-2006 65
  • 68. These slides on Taxonomies are based on information, provided by James Bach and Cem Kaner in their course on “black box testing” and from Lee Copeland’s Mastering Test Design V 3.2 © SQE 2001-2006 66 and Cem Kaner in their course on “black box testing” and from Lee Copeland’s book, A Practitioner’s Guide to Software Test Design.
  • 69. These are sources for some example Taxonomies Mastering Test Design V 3.2 © SQE 2001-2006 67
  • 70. These are sources for some example Taxonomies Mastering Test Design V 3.2 © SQE 2001-2006 68
  • 71. This is Boris Beizer’s high level taxonomy for where defects can occur. Mastering Test Design V 3.2 © SQE 2001-2006 69 You may want to build a similar taxonomy based on your applications and systems. You can use one of the samples noted to get started.
  • 72. Mastering Test Design V 3.2 © SQE 2001-2006 70
  • 73. Even considering the top two levels, it is quite extensive. All four levels of the taxonomy constitute a fine grained framework on which to categorize defects. Mastering Test Design V 3.2 © SQE 2001-2006 71 taxonomy constitute a fine grained framework on which to categorize defects.
  • 74. Mastering Test Design V 3.2 © SQE 2001-2006 72
  • 75. Mastering Test Design V 3.2 © SQE 2001-2006 73
  • 76. Mastering Test Design V 3.2 © SQE 2001-2006 74
  • 77. Your instructor will review which parts of the class helped with the challenges identified in the beginning of the course. Mastering Test Design V 3.2 © SQE 2001-2006 75 identified in the beginning of the course.
  • 78. Mastering Test Design V 3.2 © SQE 2001-2006 76
  • 79. Some suggestions for your evaluations! Mastering Test Design V 3.2 © SQE 2001-2006 77
  • 80. Mastering Test Design V 3.2 © SQE 2001-2006 78
  • 81. Hope this class really helped! Mastering Test Design V 3.2 © SQE 2001-2006 79