Debugging and Testing (Error and Types Included)

To understand debugging and testing more intuitively, lets first consider learning about different types of error that occurs while programming.

Error

Error means failure of compilation and execution of the computer program or not getting expected results after execution. Debugging and testing are systematic process during program development cycle to avoid errors in the program. Different types of error that we encounter while programming are listed below :

Types of Error:

  1. Syntax Error : Syntax error is a violation of programming rules while writing it. A syntax error does not allow the code to run. Syntax error can be easily detected during the compilation process using compiler.
  2. Logical Error : Logical error occurs when a programmer has applied incorrect logic for solving problem or left out a programming procedure. When logical error occurs program executes but fails to produce a correct result.
  3. Run Time Error : Run time error occurs during the execution of program. Stack overflow, divide by zero, floating point error etc. are examples of runtime error.

Debugging

Debugging is the process of finding errors and removing them from a computer program, otherwise they will lead to failure of the program. Even after taking full care during program design and coding, some errors may remain in the program and these errors appear during compilation or linking or execution. Debugging is generally done by program developer.

Testing

Testing is performed to verify that whether the completed software package functions or works according to the expectations defined by the requirements. Testing is generally performed by testing team which repetitively executes program with intent to find error. After testing, list of errors and related information is sent to program developer or developmen team.

Debugging vs Testing

Major differences between debugging and testing are pointed below :

It is the process of fixing errors.

It is the process of finding as many errors as possible.


Debugging is done during program development phase.

Testing is done during testing phase which comes after development phase.


Debugging is done by program developer.

Testing is generally carried out by separate testing team rather than program developer.