Software Testing Dataflow Testing ObjectOriented testing 19 1
Software Testing Dataflow Testing, Object-Oriented testing 19 1
Data flow coverage u Def x is a node where x is defined (given a value) u 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) u. A def-free path is a path from a definition to a use that does not include another definition of that variable. testing 19 2
dcu - from every def to a c-use u c-use (computation) u 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 testing 19 3
dpu - from every def to a p-use u p-use (predicate) u 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 testing 19 4
du - from every def to every use u 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 testing 19 5
TTYP task u Generate test case sets for triangle problem – dpu – dcu – du testing 19 6
Object-oriented Software Testing Object-oriented testing Pressman pp 372 -375, 410 -423 SOS ch 13 testing 19 7
Quotes u “It seems likely that more, not less testing will be needed to obtain high reliability in object-oriented systems” Binder (in Pressman) testing 19 8
Inheritance u When do we need to retest the base class? – When can we assume that the base class has already been tested? testing 19 9
Dynamic Binding u When do we have to be concerned with dynamic bindings? – virtual functions testing 19 10
Concerns about OO Testing u Functional testing seems just as relevant to oo software as to traditional software u Random and operational testing seem relevant to oo software u Structural testing, C 0 and C 1, doesn’t seem effective for oo software, except. . . testing 19 11
Coverage of functions u Every function should be called at least once u Overloaded functions need to have every version executed testing 19 12
Coverage of function calls u 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 testing 19 13
Coverage of States u An alternative view of testing is based on the states of a process u Testing coverage can be – every state – every transition – every pair of transitions – etc. testing 19 14
Data Flow coverage u Can we apply data flow coverage to object oriented software u Def’s are often in one method, use in another testing 19 15
Schedule u Thurs, Apr 13 – Reliability - SOS 10. 3 - 10. 3. 3 – PLQ u Tues, Apr 18 – Finish reliability, SQA task u Thurs, Apr 20 – Make-up exam for OCL testing 19 16
- Slides: 16