SW Testing (Unit-II)
SW Testing (Unit-II)
Controllability: “ The better we can control the software, the more the
testing can be automated and optimize”
All possible output can be generated through some combination of
input
All code is executable through some combination of input
Simplicity: “The less there is to test, the more quickly we can test it”
Functional simplicity (minimum requirement)
Structural simplicity (architecture is modularized to limit propagation of
fault)
Code Simplicity (a coding standard is adopted for ease of inspection and
maintenance)
Sequence
If Statement
Case
33
6 4
4
7 88
5
9
10
11
2,3
6 4,5 node
R2
7 R3 8 R1
9
10
Edges R4
11
Path1 : 1—11
Path2: 1—2—3— 4 – 5 – 10 – 1 – 11
Path3 : 1 – 2 – 3 – 6 – 8 – 9 – 10 – 1 – 11
Path 4: 1 – 2 – 3 – 6 – 7 – 9 – 10 – 1 – 11
Each path introduce a new edge
2. Determine cyclomatic complexity from the flow graph using any one
three methods specified for same
Condition Testing
Condition testing is a test case design method that exercise the logical
condition contained in program module
A simple condition is a Boolean variable or a relational expression ,possibly
preceded with not operator. A relational operator may takes the form
E1 <relational-operator> E2
E1 and E2 are arithmetic Expression and <relational operator > is on of
following :<, <=,>,>=,=, !=
A compound statement is composed of two or more simple conditions, Boolean
operator and parenthesis
A condition without relation expression is referred to as Boolean Expression
Undirected link
Parallel link
Object#3
Allows editing of
Is Represented as
Contains
Document
Text
Transaction flow modeling: the node represent some transaction and link
represent the logical connection between steps
Finite state Machine: The node represent different user observable states in
software and link represent transition that occur to move from state to state
Data flow Modeling: The nodes are data objects and link are their
transformation that occur to translate one data object to other
Timing model: The nodes are program objects and link are sequential
connection between those objects
All objects are tested for transitive, symmetric and reflexive properties
Live test
Then the third step is to validate the system obtained from previous
step and also check for errors
The last step is to check for system security when the software is
integrated with hardware and people
Module Interface
Local data structure
~~~~~
Boundary condition
~~~~~
Independent Paths
~~~~~ Error handling Paths
Test
Cases
All above things are checked for unit testing but they are following one
particular sequence
Driver
Interface
Local data structure
Module to Boundary condition
be Independent Paths
tested Error handling Paths
M1
M2 M3 M4
M5 M6
M7
The main control module is used as test driver and stubs are
substituted for all components directly subordinate to main control
module
Depending on integration approach selected subordinate stubs are
replaced one at time with actual components
Test are conducted as each component is integrated
On completion of each set of tests another stub is replaced with
real world component
Regression testing may be conducted to ensure that new error have
not introduce
A series of test is designed to expose errors that will keep the build
from performing properly its function
The build is integrated with other builds and entire product is smoke
tested daily. Integration approach may be top down or bottom up
The card consist of class name , its responsibility (operations) and its
collaborators (other classes to which it sends message and on which it depends
for accomplishment for its responsibilities
Test case will be designed to check all the above step listed are
correctly executed
The best test case are derived when designer look at the system in a
new or unconventional way
Ask a question like “Might the user want to use this operation which
applies only to Scanner Object while working with the printer?”
Whatever the interface style, test case design that exercise the surface
structure should use both objects and operation as clues leading to
overlooked tasks