1. Bottom Up Testing | |
In this approach you identify all functions in the program which do not call any other functions. Drivers are created which test these functions thoroughly. When this is completed all functions which call these low level functions are added and drivers created to call those functions. Continue working back up the levels until you reach the top level (usually in main()). | |
2. Top Down Testing | |
In this approach you start with the top level function (usually main()) and devise functions stubs to mimic the action of lower level functions which are called by main. After thoroughly testing main with the stubs you substitute the real functions which main calls and create stubs for the next level of functions called by those which are called by main. Continue working down the levels until you reach the level where functions do not call any other functions. |
1. Statement Testing | |
Testing each line or small group of lines of code as they are added to the source. | |
2. Unit Testing | |
The objective is to to test all the possible behaviors of each individual function in a program. | |
3. Integration Testing | |
After each function has been thoroughly tested with Unit Testing, tests are performed to determine how functions work together. | |
4. Acceptance Testing | |
Before a software product is delivered to the customer it is tested to make sure all of the stated requirements have been met. | |
5. Regression Testing | |
Testing done during the maintenance phase. Invariably bugs will be found in the software, after it has been delivered, these will have to be fixed. The software must then be tested to ensure that the bugs were fixed and that fixing the bugs did not introduce other errors into the software. |
1. Determine what is the goal of the test. | |
2. Determine the inputs that will demonstrate the goal of the test and the expected output from the test. Ensure that all possible cases are covered. | |
3. Modify the code or create stubs and/or drivers as needed to run the test. | |
4. Run the program with the test code and record the results. | |
5. Compare the results to the expected results. If discrepancies are noted determine why they occurred, fix the problem, and retest. |