written 5.7 years ago by | • modified 5.7 years ago |
Mumbai University > Information Technology > Sem 8 > Software Testing and Quality Assurance
Marks: 10 Marks
Difficulty : Medium
written 5.7 years ago by | • modified 5.7 years ago |
Mumbai University > Information Technology > Sem 8 > Software Testing and Quality Assurance
Marks: 10 Marks
Difficulty : Medium
written 5.7 years ago by | modified 5.7 years ago by |
Object oriented software is based on concept of classes and objects. Therefore, smallest unit to be tested in a class.
There are some issues in class testing.
A class can’t be tested directly first one need to create instances of class, as object then test it. Thus, abstract class cannot be tested, as its object can’t be created.
The methods should be tested with reference to class or class hierarchy in the direction of complete testing of a class.
Another important thing is inheritance is some classes have been derived from the bare class, them dependent class testing is not sufficient.
Feature based testing :
The features of class are categorized into six groups.
Create
Destroy
Moefiers
Predicates
Selectors
Iterators
State based testing :
State based testing is based on finite state customers that tests each feature with all its valid states.
State based testing tests interactions by monitoring effects that feature have on state of object.
The process of state based testing is:
Define the states.
Define the transistors between states.
Define test scenarios.
Define test values for each state.
Example for class testing: class to implement an integer stack class stack with following data item count, empty, full, pop max size.
So for testing this class following points must be considered.
Item count cannot have negative.
There is upper bound check on item count. I.e. item count ≤ max size.
Empty stack i.e. item count = 0
Full stack i.e. item count = max size.