Test Strategies for Object –Oriented Software

The objective of testing , stated simply, is to find the greatest possible number of errors with a manageable amount of effort applied over a realistic time span.

Unit testing in the OO context:

When object–oriented software is considered, the concept of the unit changes. Encapsulation drives the definition of classes and objects. This means that each classes and objects. This means that each class and each instance of a class packages attributes (data) and the operations that manipulate these data. An encapsulated class is usually the focus of unit testing. However. Operations (methods) within the class are the smallest testable units. Because a class can contain a number  of different classes, the tactics applied to unit testing must change.

Integration testing in the OO context:

Because object–oriented software does not have  an obvious hierarchical  control structure, traditional top–down and bottom–up integration strategies.

          There are two different strategies for integration testing of OO systems [Bin94b]. The first, thread based testing, integrates the set of classes required to respond to one input or event for the system. each thread is integrated and tested individually. Regression testing is applied to ensure that no side effects occur. The second integration approach, use-based testing, begins the construction of the system by testing those classes (called independent classes) that use very few if any server classes. After the independent classes are tested, the next layers of classes, called dependent classes, that use the independent classes are tested. This sequence of testing layers of dependent classes continues until the entire system is constructed.

          The use of drivers and stubs also changes when integration testing of OO systems is conducted. Drivers can be used to test operations at the lowest level and for the testing of whole groups of classes. A driver can also be used to replace the user interface so that tests of system functionality can be conducted prior to implementation of the interface.
Cluster testing is one step in the integration testing of OO software, Here, a cluster of collaborating classes (determined by examining the CRC and object-relationship model) is exercised by designing test cases that attempt to uncover errors in the collaborations.

Related

Software engineering 1670364496106710597

Post a Comment

emo-but-icon

item