Download Exhaustive Testing and Different Types of Testing: An Overview - Prof. Stephen M. Thebaut and more Exams Software Engineering in PDF only on Docsity!
Software Testing
Prepared by Stephen M. Thebaut, Ph.D.
CEN 5035Software Engineering University of Florida
Topics •^ Basic concepts •^ Black Box Testing Techniques •^ White Box Testing Techniques •^ Integration and Higher-Level Testing
Definitions of “TESTING” (cont’d) •^ IEEE: The process of exercising orevaluating a system or systemcomponent by
manual
or^ automated
means to
verify that it satisfies specified requirements
or to
identify differences
between expected and actual results
Fisherman’s Dilemma •^ You have 3 days for fishing and 2 lakesto choose from. Day 1 at lake X nets 8fish. Day 2 at lake Y nets 32 fish. Whichlake do you return to for day 3? •^ Does your answer depend on anyassumptions?
Invalid and Unexpected Inputs •^ Test cases must be written for INVALIDand UNEXPECTED, as well as valid andexpected, input conditions. •^ In many systems, MOST of the code isconcerned with input error checkingand handling.
Anatomy of a Test Case •^ What are the parts of a test case?^ 1.
a description of input condition(s) 2. a description of expected results
-^ Where do ‘‘expected results’’ comefrom?
When Might Testing
Guarantee
an
Error-Free Program? a.^ When branch, condition, and loopcoverage are achieved b.^ When dataflow testing is utilized c.^ When path and compound conditioncoverage are achieved d.^ When all combinations of all possibleinput and state variable values arecovered e.^ (None of the above.)
Exhaustive Testing is Exhausting! •^ Situation:^ –^ A module has 2 input parameters.^ –^ Word size is 32 bits.^ –^ Testing is completely automated: 100nanoseconds are required for each testcase. •^ Question:
How long would it take to test this module
exhaustively
, i.e., covering
every possible combination of input values?
Exhaustive Testing is Exhausting (cont’d) •^ Short Answer: •^ Long Answer: •^ Since we can’t generally test everything (i.e.,test
exhaustively
), we need to weigh COST
and RISK.
Testing Techniques •^ Black-Box:
Testing based solely on analysis of requirements (unit/componentspecification, user documentation, etc.).Also know as
functional testing.
-^ White-Box:
Testing based on analysis of internal logic (design, code, etc.). (But expected
results still come from requirements.) Also known as
structural
testing.
Levels or Phases of Testing (cont’d) •^ Product:
testing a collection of components that make up a product(e.g., subsystem, application, etc.) • System:
testing a collection of products that make up a deliverablesystem
(cont’d)
Levels or Phases of Testing (cont’d) •^ Testing usually:^ –^ begins with
functional
(black-box)
tests, – is supplemented by
structural
(white-
box) tests, and – progresses from the unit level towardthe system level with one or moreintegration steps.
Other Types of Testing (cont’d) •^ Alpha:
actual end-user testing performed within the developmentenvironment • Beta:
end-user testing performed within the user environment prior togeneral release
Waterfall Model of Testing Process Test Planning^ Test Design
Test Implementation
Test Execution
Execution Analysis
Result Documentation
Final Reporting our focus