How Debugging is different from Software Testing
When the testing of any software application gets completed successfully, debugging activity starts. During testing errors come to the light through efficiently designed test cases. Thereafter the process by which the detected errors are practically removed is called debugging. After testing, we immediately start our hunt for the errors i.e., to identify the interface or the module responsible for causing it. Then that section of the code is to be studied to determine the cause of the problem. This process is called debugging.
Hence, we can say that debugging is the name of an activity wherein we firstly locate the errors & correct them thereafter. Debugging is totally different from testing. However debugging is an activity, which follows testing. When we execute a test case, the debugging activity gets started.
There remain two possible results out of any debugging effort viz.
(1) We shall be able to identify the causes of errors, which can be subsequently removed.
(2) We shall not be able to identify any causes.
While debugging, we come across errors, which
can lie on two extremes; the first one being slightly disturbing while on the other extreme it can be highly damaging. Slightly disturbing errors can be like getting an output with improper format & examples of highly damaging errors can be physical damage or any type of system failure
Important guidelines while doing debugging are:
1) Debugging is the process of solving a problem. Hence, individuals involved in debugging should understand all the causes of an error before starting with debugging.
2) No experimentation should be done while performing debugging. The experimental changes instead of removing errors often increase the problem by adding new errors in it.
3) When there is an error in one segment of a program, there is a great possibility of presence of another error in the program. Hence a strong need to examine the remaining program arises.
4) Whenever any new piece of code gets added to the program, It becomes essential to ascertain its success or failure in fixing the errors. This calls for regression testing till the errors get eliminated to the desired level of satisfaction.
Testing involves unit, integration and system level approaches to detect the faults. Whereas debugging checks the correctness and performance of the software application to do the fault detection.
Five broad points of differences among debugging and software testing are:
|1||It is an activity of locating and correcting errors.||It is the process of executing a program with an intention to find faults in it.|
|2||It results as a consequence of testing.||Software testing is one of the most important phase of software development life cycle (SDLC).|
|3||It begins with the execution of a test case.||Testing commences immediately from the moment code is written.|
|4||It tries to match the symptom with the cause, which leads to correction of error.||It comprises of software verification and validation (V&V).|
|5||It checks the correctness and performance of the software application.||It involves unit, integration and system level testing.|