1
44kviews
Issues in Object oriented testing.
1 Answer
3
3.5kviews

Strong text : Traditional testing methods are not directly applicable to OO programs as they involve OO concepts including encapsulation, inheritance, and polymorphism. These concepts lead to issues, which are yet to be resolved. Some of these issues are listed below.

1.) Basic unit of unit testing.

  • The class is natural unit for unit test case design

  • The methods are meaningless apart from their class.

  • Testing a class instance (an object) can validate a class in isolation.

  • When individually validated classes are used to create more complex classes in an application system, the entire subsystem must be tested as whole before it can be considered to be validated(integration testing).

2.) Implication of Encapsulation.

  • Encapsulation of attributes and methods in class may create obstacles while testing. As methods are invoked through the object of corresponding class, testing cannot be accomplished without object.

  • In addition, the state of object at the time of invocation of method affects its behavior. Hence, testing depends not only on the object but on the state of object also, which is very difficult to acquire.

3.) Implication of Inheritance.

  • Inheritance introduce problems that are not found in traditional software.

  • Test cases designed for base class are not applicable to derived class always (especially, when derived class is used in different context). Thus, most testing methods require some kind of adaptation in order to function properly in an OO environment.

4.) Implication of Genericity.

  • Genericity is basically change in underlying structure.

  • We need to apply white box testing techniques that exercise this change.

i.) Parameterization may or may not affect the functionality of access methods.

ii.)In Tableclass, elemType may have little impact on implementations of the access methods of the Table. Example: generic (parameterized class) class Tableclass(elemType) int numberelements; create(); insert(elemType entry); delete(elemType entry); isEmpty() returns boolean; isentered(elemType entry) returns boolean; endclass;

  • But UniqueTable class would need to evaluate the equivalence of elements and this could vary depending on the representation of elemType. Example: class UniqueTable extends Table insert(elemType entry); endclass;

4.) Implications of Polymorphism

  • Each possible binding of polymorphic component requires a seperate set of test cases.

  • Many server classes may need to be integrated before a client class can be tested.

  • It is difficult to determine such bindings.

  • It complicates the integration planning and testing.

5.) Implications for testing processes

  • Here we need to re-examine all testing techniques and processes.

Nalla padinga naasama ponga frnds..... VVCOE

Please log in to add an answer.