1 Reply Latest reply: Sep 3, 2007 4:23 PM by 807600 RSS

    unit testing avoid us from debugging how?

    807600
      Hi
      i read that unit testing avoid us from debugging how?
      when i see netbeans on tools menu create junit tests
      how this avoid us from debugging the code?

      thanks in advance.
        • 1. Re: unit testing avoid us from debugging how?
          807600
          You never avoid debugging. Unit tests help you avoid having to use a debugger and painfully stepping through your code. They do this because they can help isolate problems down to individual classes and methods.

          Of course, unit tests don't help in that way much if you write huge, bloated, do-everything classes that follow a poor object design. So you still have the onus to design discrete, well-encapsulated classes. But if you do so, it becomes a lot easier to quickly find broken parts and fix them.