Exam 24: Testing Object- Oriented Applications
Describe the how test cases are derived from behavior models to facilitate interclass testing?
-Test cases must cover all states in the state transition diagram
-Breadth first traversal of the state model can be used (test one transition at a time and only make use of previously tested transitions when testing a new transition)
-Test cases can also be derived to ensure that all behaviors for the class have been adequately exercised
How does unit testing differ for object-oriented testing as compared to conventional software unit testing?
You can no longer test a single operation in isolation (the conventional view of unit testing)but rather,as part of a class.Rather than testing an individual module,the smallest testable unit is the encapsulated class.Because a class can contain a number of different operations and a particular operation may exist as part of a number of different classes,the meaning of unit testing changes dramatically.
Describe three partitioning strategies that can be used when performing class level testing for OO systems.
State-based partitioning - tests designed so that operations that cause state changes are tested separately from those that do not
Attribute-based partitioning - for each class attribute,operations are classified according to those that use the attribute,those that modify it,and those that do not use or modify the attribute
Category-based partitioning - operations are categorized according to the function performed: initialization,computation,query,or termination
Filters
- Essay(0)
- Multiple Choice(0)
- Short Answer(0)
- True False(0)
- Matching(0)