Dataflow Testing, Object-Oriented Software Testing Dataflow Testing, Object-Oriented
Data flow coverage Def x is a node where x is defined (given a value) Use x is a node where the value of x is used in an expression or a decision C use is in a computation P use is in a decision (predicate) A def-free path is a path from a definition to a use that does not include another definition of that variable.
dcu - from every def to a c-use c-use (computation) if a variable is defined in node A and there are computational uses in node B and D, the dcu coverages requires an def-free path segment of either ABC or ACD
dpu - from every def to a p-use p-use (predicate) if a variable is defined in node A and it is used in a decision in C, the dpu coverage requires two def-free paths, one with segment of A...CD and one with A...CE
du - from every def to every use if a variable is defined in node A and there are computational uses in node B and D, the du coverage requires a def-free path from node A to node B and a def-free path from node A to node D
TTYP task Generate test case sets for triangle problem dpu dcu du
Object-oriented Software Testing Object-oriented testing Pressman pp 372-375,410-423 SOS ch 13
Quotes “It seems likely that more, not less testing will be needed to obtain high reliability in object-oriented systems” Binder (in Pressman)
Inheritance When do we need to retest the base class? When can we assume that the base class has already been tested?
Dynamic Binding When do we have to be concerned with dynamic bindings? virtual functions
Concerns about OO Testing Functional testing seems just as relevant to oo software as to traditional software Random and operational testing seem relevant to oo software Structural testing, C0 and C1, doesn’t seem effective for oo software, except ...
Coverage of functions Every function should be called at least once Overloaded functions need to have every version executed
Coverage of function calls Every MM pair (Method-message) should be executed. that is, every call to a method from a method should be executed if a function has more than one call to another method, all calls need to executed
Coverage of States An alternative view of testing is based on the states of a process Testing coverage can be every state every transition every pair of transitions etc.
Data Flow coverage Can we apply data flow coverage to object oriented software Def’s are often in one method, use in another
Schedule Thurs, Apr 13 Tues, Apr 18 Thurs, Apr 20 Reliability - SOS 10.3 - 10.3.3 PLQ Tues, Apr 18 Finish reliability, SQA task Thurs, Apr 20 Make-up exam for OCL