Lecture 9 Software Engineering CS-2105
Lecture 9 Software Engineering CS-2105
Software
Testing Conventional Applications
Testability
• Operability—it operates cleanly
• Observability—the results of each test case are readily observed
• Controllability—the degree to which testing can be automated and
optimized
• Decomposability—testing can be targeted
• Simplicity—reduce complex architecture and logic to simplify tests
• Stability—few changes are requested during testing
• Understandability—of the design
What is a “Good” Test?
• A good test has a high probability of finding an error
• A good test is not redundant.
• A good test should be “best of breed”
• A good test should be neither too simple nor too complex
Internal and External Views
• Any engineered product (and most other things) can
be tested in one of two ways:
• Knowing the specified function that a product has been
designed to perform, tests can be conducted that
demonstrate each function is fully operational while at the
same time searching for errors in each function
• Knowing the internal workings of a product, tests can be
conducted to ensure that "all gears mesh," that is, internal
operations are performed according to specifications and all
internal components have been adequately exercised.
Test Case Design
• "Bugs lurk in corners and congregate at boundaries ..."
Boris Beizer
• OBJECTIVE
• to uncover errors
• CRITERIA
• in a complete manner
• CONSTRAINT
• with a minimum of effort and time
Exhaustive Testing
Q: How many possible paths are
there?
14
There are 10 possible paths! If we execute one
test per millisecond, it would take 3,170 years to
test this program!!
loop < 20 X
Selective Testing
Selected path
loop < 20 X
Software Testing
white-box black-box
methods methods
Methods
Strategies
White-Box Testing
• V(G) = 5 + 1 = 6
• R = The number of regions
• E = The number of edges
• N = The number of nodes
• P = The number of decisions
Basis Path Testing Notes
you don't need a flow chart,
but the picture will help when
you trace program paths