Skip to main content

Section 2.4 Testing vs Debugging

When we “write a program”, we actually spend most of our time testing and debugging. These are two separate things. Testing refers to determining whether the program operates as we intend. Debugging refers to correcting the program once we determine that it is not operating as we intend. So we can only debug to the extent that we have tested and determined that there is a problem that needs to be corrected. Debugging to fix a known problem can sometimes be extremely hard, but is often somewhat mechanical. Testing requires a lot of skill and empathy, in order to think of all of the ways that a program might go wrong (in particular, all of the input paths to the program that might affect its behavior).
You have attempted of activities on this page.