Subscribe Us

header ads

Debugging and testing strategies


Debugging :-

Debugging is the process of detecting and removing of existing and potential errors (also called as ‘bugs’) in a software code that can cause it to behave unexpectedly or crash. To prevent incorrect operation of a software or system, debugging is used to find and resolve bugs or defects. When various subsystems or modules are tightly coupled, debugging becomes harder as any change in one module may cause more bugs to appear in another. Sometimes it takes more time to debug a program than to code it.

These are the following some important approaches that are available to identify the error location :

Brute force method :- In this approach,the program is loaded with print statement to print the intermediate value with hope the sum of the printed value will help to identify the statement in error.

Backtracking :- In this approach beginning from the statement at which an error symptom is observed the source code is tracked backwards until the error is discovered.

Cause elimination method :- In this approach, a list of causes which could possibly have contributed to the error symptom is developed and tested are conducted to eliminate each cause.

Program slicing :- It is similar to backtracking. However the search space is reduced by defining slice. A slice of a program for a particular valuable at a particular statement is a set of source line preceding this statement that can influence the value of the variable.

Post a Comment

0 Comments