Software testing
Testing techniques
Testing strategies
• Testing is the process of exercising the
program with the intent of finding errors
objectives
• program with the intent of finding errors
principles
• All tests should be traceable to customer
requirements
• It should be planned long before testing begins
• Parento principles holds for testing
• Should begin “in small ”and progress I towards in
large
• Exhaustive testing is not possible
• Testing should be conducted by an independent
third party
Testability
• Opearbility – it operates cleanily
• Observability
• Controllability
• Decomposability
Attributes of a good test
• Has the high prob of finding an error
• Is not redundant
• “Best of breed”
• Neither too simple or too complex
What testing shows
• Errors
• Requirements conformance
• Performance
• An indication of quality
Who tests the software
• Developer – understands the system but will
test “gently ”and is driven by delivery
• Independent testers- Must learn about the
system, but an attempt to break it and is
driven by quality
SOFTWARE TESTING
• White box
• Black box methods
WHITE BOX TESTING
• Also called Glass box testing
• Users the control structure of the procedural
design
• Guarantee that all paths are executed atleast
once
• Do all logical decisions
• Execute all loops
• Exercise internal data structures
• Selective testing - a concept were a particular
area is tested with a lot of stress ..
Why cover
• Logical errots and assumptions are inversely
prop to a path ‘s execution prob
• We often belive tht a path is not likely to be
executed ; in fact reality is often counter
intuitive
• Typographical errors are random;its likely that
untested paths will contain some
Basis path testing
• Basis path testing is a methiod in which each
statement in the software is executed atleast
once
Basis path testing
• First we compute the cyclomatice (no of
decision boxex) complexity
• Number of simple decisions +1
Or
• Number of enclosed areas +1
Cyclomatic complexity
• A number of industry studies have declared
that the higher V(G), the higher the probability
or errors
Loop testing
• Simple loops
• Nested loops(one inside the other)
• Concatenated loops
• Unstructured loops
Control structure testing
Condion testing
• Boolean operator error
• Boolan variable error
Dataflow testing
• DEF(S)- if any varible is defined in the
programe then u should use it
• USE(S) -
Black box testing
requireme
nts
Input test data
System
Equivalence partitioning
• Input data and output result often fall into
different classes where all members of a class
are related
• Each of these classes is an equivalence
partition where the program behaves in an
equivalent way for each class member
• Test cases should be chosen from each
partition (or class)
Guidelines for equivalence classes
• If an input condition specifies range
– One valid and two invalid equvalence classes are
needed
If a condition requires a specific value
then one valid and two invalid equvalence classes are
needed
If an input condition specify a member of set
one valid and one invalid equvalence classes are needed
If an input condition is boolean
one valid and one invalid class are needed
Boundary value analysis
• Compliments equivalences partitioninng
• Focuses is on the boundaries of the input
• - if input condition specifies a range bounded
by a certain values ,say, a and b ,then cases
should include
• -the values for a and b
Other black box testing
• Error guessing methiod
• Decision table tech
• Cause effect graphing