What is the difference between test and debugging?


In the book "Introduction to Software Testing" by Ammann & Offutt mentions in p.32 the 5 levels maturity models of software testing:

  • Level 0 - There is no difference between testing and debugging.
  • Level 1 - The purpose of a test is to show that a software works.
  • Level 2 - The purpose of a test is to show that the software does not work.
  • Level 3 - The purpose of a test is not to prove anything specific but to reduce the risks of using the software.
  • Level 4 - Software testing is a mental discipline that helps all IT professionals develop quality software.

Although it does not go into detail about debugging. What is the difference between testing and debugging?

PS: translated question from question in community programmers

asked by anonymous 27.08.2016 / 04:09

1 answer



In the question you already have a good definition about testing. It has a broader definition in Tests, TDD, Unit Test, QA, and the like. What's different about test concepts? .

So we can conclude that it is a measure to ensure quality. You verify that the software is compliant.

It is a development process as a whole. Testing lasts throughout the project lifecycle.

New tests are desirable. If a problem is detected by other means (a debugging, for example), a test to ensure that the problem does not recur is desirable.

Tests are done with specific tools that automate the process and codes that have the function of saying if something very specific generating the expected result or not.

The concern is with the result, not how you got there.


Debugging is a process of repairing something that is known to be broken.

In general, it is punctual for a defect.

Often the process starts because a test detected that there is a defect.

It is something that simulates step by step execution manually, to find the reason for the problem and determine what needs to be changed to solve it.

In general it is done with the help of additional tools or extra code to determine what is happening and in the end when the problem is solved it is thrown away.

Focus is the detail of the execution, there is a concern with the algorithm and state changes.


Everyone knows that debugging is twice as difficult as writing a program in the first place. So, if you're as smart as you can, when you write it, why are you going to debug it?


- Brian Kernighan

What I would really like is that people who decide to learn to learn at least the basics of debugging, which helps to understand a little better what is being done. At times that "programming" seems to be copying ready codes and filling in gaps without understanding what you're doing, debugging seems like something unnecessary. Luckily we still have professionals interested in doing their best and understanding the whole process.

27.08.2016 / 14:49