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.
Testing can either break your code or make your code unbreakable. You must be careful while doing testing to really do a good task.