Subscribe by Email


Monday, August 1, 2011

What are different testing methods that are applicable at the class level?

Object oriented testing begins by evaluating the object oriented analysis and object oriented design models, structured walk-throughs, prototypes, formal reviews of correctness, completeness and consistency.
Test each operation as part of a class hierarchy because its class hierarchy defines its context of use. The approach that can be used :
- Test each method (and constructor) within a class.
- Test the state behavior (attributes) of the class between methods.

Each test case should contain:
- a list of messages and operations that will be exercised as a consequence of the test.
- a list of exceptions that may occur as the object is tested.
- a list of external conditions for setup.
- supplementary information that will aid in understanding or implementing the test.

To test a class, there are two methods called as random testing and partitioning applicable.

For random testing for object oriented classes, the number of possible permutations for random testing can grow quite large. A strategy similar to orthogonal array testing can be used to improve testing efficiency. In random testing, methods applicable to class are identified, constraints are defined, a minimum test sequence is defined and then generate a variety of random (but valid) test sequences.

Partition testing reduces the number of test cases. State based partitioning categorizes class operations based on the ability to change the state of the class. Attribute based partitioning categorizes class operations based on the attributes that they use. Category based partitioning categorizes class operations based on generic function that each perform.


No comments:

Facebook activity