Unit Testing

After coding, programmers check/validate completeness and correctness of the program which is called as unit testing or open box or clear box testing techniques. It includes following points:

  • Program Working
  • Program Correctly Working 
  • Program Fastness
Unit Testing is categorized into the following parts:
  1. Basic Path Coverage
  2. Control Structure
  3. Program Technique Coverage
  4. Mutation Coverage
Basic Path Coverage:

In this technique, programmer runs the program more than one time to cover run time errors and syntax errors in all areas of programs. To find the number of paths in a program we can follow 'Cyclomatic Complexity' like if number of paths is 6 then we have to run the program for 6 times to cover all areas of code in a program.

Control Structure Coverage:

After confirmation of the program execution (i.e. program is running without throwing any run time error or syntax error), then programmers concentrate on correctness of input(s) and output(s) of that program. like debugging the code (i.e. running the program line by line)

Program Technique Coverage:

In this technique, programmers calculates the execution speed of the program. If the programmer finds the execution time as unacceptable then he/she may change the program structure without disturbing the functionality.

Mutation Coverage:

After completion of program technique coverage, programmers check the correctness of testing on that program by performing changes in different areas of that program. Here mutation means 'Change in a program' 



Learn Next- Integration Testing