Download presentation

Presentation is loading. Please wait.

Published byKaitlyn Gledhill Modified over 2 years ago

1
OO Testing Problems Adequate Testing and OOP Perry/Kaiser

2
Antidecomposition Adequacy Reusing a piece of software in a new context requires retesting. Antidecomposition (AD) adequacy rule (Weyuker) –There exists a program P and a component Q of P such that T is adequate for P, T' is the set of vectors of values that variables can assume on entrance to Q for some t of T and T' is not adequate for Q. PQ

3
Applicability Program-based testing –Some part of Q is not reachable in P but is reachable in other contexts Specification-based testing –The enclosing program P may not utilize all the functionality defined by the specification of Q

4
Application to AP Retesting after class graph change. Reusing a piece of software (e.g., a strategy) in a new context (a new class graph) requires retesting. Antidecomposition adequacy rule (Weyuker) –There exists a program P and a component Q of P such that T is adequate for P, T' is the set of vectors of values that variables can assume on entrance to Q for some t of T and T' is not adequate for Q.

5
Application to AP Adaptive program Q used in program P (determined by a class graph and Q). If P is adequately tested, Q might not be adequately tested. P Q

6
Comparison: AP versus OO during evolution If class graph changes, it is necessary to re-test generated program. Whether program is hand-coded or generated, it needs to be tested.

7
DJ example ClassGraph cg = new ClassGraph();//*.java A a = new A(…); cg.traverse(a, new StrategyGraph (“A->B”, new MyVisitor());

8
Application Antidecomposition: Retest inherited methods Class C { int v; void j(){v=0;}} class D extends C { void k(){v=1;}} Need to retest j in D!!!

9
Other applications of testing rules Encapsulated unit: syntactic separation –interface –implementation Change in implementation only: what needs to be retested?

10
Anticomposition rule Adequately testing each individual program component does not necessarily suffice to adequately test the entire program. Consider P and Q to be mutually recursive. P has the opportunity to modify the context seen by Q in a more complex way than could be done by stubs during testing of components in isolation

11
Surprise Intuition: Specification-based testing: limit testing only to modified unit. Anticomposition: need to retest every dependent unit as well

12
Test adequacy axioms Antiextensionality: if two programs compute the same function

Similar presentations

© 2017 SlidePlayer.com Inc.

All rights reserved.

Ads by Google