Unit Testing: -
After completion of design & their reviews, the programmers start coding.In this phase, the programmers prepare programs & then test each program using White Box Testing Techniques.
There are 4 White Box Testing (Unit Testing) Techniques:
1.Basis Path Testing
2.Control Structure testing
3.Program technique Testing
4.Mutation Testing
These Techniques are applicable only for Programs.
1.Basis Path Testing:
During this test the programmers concentrate on the execution of programs without any runtime errors. To conduct this test, the corresponding programmer follows the below approach.• Write a program with respect to LLD (Low Level Design)
• Draw a flow graph for that program.
• Calculate cyclomatic complexity.
• Runt that program more than one time to cover all executable areas.
Eg:
One should run the above program 2 times to cover all executable areas. A programmer gets confidence that a program is running only when the cyclomatic complexity is reached in running the programs designed.
NOTE: The above program should be run 2 times
i. One time to check whether if condition is satisfied or not
ii. Next time to check whether the else condition is satisfied or not, without any runtime errors.
2. Control Structure Testing:
During this test, the corresponding programmer concentrates on correctness of program execution in this test, they verify every statements of program execution. In this test, they verify every statements input state & Output state.Eg: Debugging
3. Program Technique Testing:
During this test, the programmers concentrate on the execution speed of a program. If the execution speed is not reasonable, then programmers perform changes in the structure of the program without disturbing functionality of the program.Eg: Swapping Program
i. c=a;
a=b; b=a-c;
b=c; c=b-a
More Memory usage for fast running Low memory usage for fast running
4. Mutation Testing:
During this test, the corresponding programmers estimate completeness & correctness of a program testing.Eg:



No comments:
Post a Comment