Test Cases in Object-oriented Testing
The methods used to design test cases in OO testing are based on the conventional methods. However, these test cases should encompass special features so that they can be used in the object-oriented environment. The points that should be noted while developing test cases in an object-oriented environment are listed below.
- It should be explicitly specified with each test case which class it should test.
- Purpose of each test case should be mentioned.
- External conditions that should exist while conducting a test should be clearly stated with each test case.
- All the states of object that is to be tested should be specified.
- Instructions to understand and conduct the test cases should be provided with each test case.
Object-Oriented Testing Techniques
Grey Box Testing
The different types of test cases that can be designed for testing object-oriented programs are called grey box test cases. Some of the important types of grey box testing are:
- State model based testing: This encompasses state coverage, state transition coverage, and state transition path coverage.
- Use case based testing: Each scenario in each use case is tested.
- Class diagram based testing: Each class, derived class, associations, and aggregations are tested.
- Sequence diagram based testing: The methods in the messages in the sequence diagrams are tested.
Techniques for Subsystem Testing
The two main approaches of subsystem testing are:
- Thread based testing: All classes that are needed to realize a single use case in a subsystem are integrated and tested.
- Use based testing: The interfaces and services of the modules at each level of hierarchy are tested. Testing starts from the individual classes to the small modules comprising of classes, gradually to larger modules, and finally all the major subsystems.
Categories of System Testing
- Alpha testing: This is carried out by the testing team within the organization that develops software.
- Beta testing: This is carried out by select group of co-operating customers.
- Acceptance testing: This is carried out by the customer before accepting the deliverables.