What is the difference between testing and debugging?

Asked

Viewed 2,776 times

15

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

  • Level 0 - No difference between testing and debugging.
  • Level 1 - The purpose of a test is to show that 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 I don’t go into details about debugging. What’s the difference between testing and debugging?

PS: question translated from a question in the programmers community (en)

1 answer

12


Testing

The question already has a good definition about tests. It has a broader definition in Tests, TDD, Unit Test, QA and similar. What is the difference between concepts on tests?.

So we can conclude that it is a measure to "guarantee" quality. You check whether the software is compliant.

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

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

Tests are made with specific tools that automate the process and codes that have the function of telling whether something very specific generating the expected result or not.

The concern is with the result, not how it arrived at it.

Testing is to identify when a code is correct, not when it has a problem. A common mistake is for people to believe that if they pass the test there is absence of code problems, but it only says that certain situations happened correctly, can not reverse the logic that if passed the test there is no bugs.

Debugging

Debugging is a repair process for something that is known to be broken.

In general it is punctual for a defect.

Often the process is initiated because a test has detected that there is such a defect.

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

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

The focus is the detail of the execution, there is a concern with the algorithm and the 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 will you debug it?

-- Brian Kernighan

What I would really like is for people who choose to program to learn at least the basics of debugging, which already helps to understand a little better what she’s doing. At a time when "programming" has turned to copying ready-made code and filling gaps without understanding what it is doing, knowing how to debug seems to be unnecessary. Luckily we still have professionals interested in doing the best possible and understanding the complete process.

Browser other questions tagged

You are not signed in. Login or sign up in order to post.