Re: how many bugs do you find and correct during TDD?

From: Andrew McDonagh (news_at_andrewcdonagh.f2s.com)
Date: 12/31/04


Date: Thu, 30 Dec 2004 23:21:55 +0000

Tammy wrote:
>
> H. S. Lahman wrote:
>
>> Mechanical bugs (e.g., from typos, sloppy coding practices, etc.) are
>> going to be the same regardless of how one designs the software or the
>> tests. Their incidence is directly proportional to the LOC written.
>
>
> How do you know? So TDD doesn't actually find any "real" bugs,
> it just prevents them from happening?

TDD is a design methodology whereby the systems design evolves from
tests, not from UML diagrams/meetings/Functional Specs etc. These things
do happen, but usual within the 10 min time frame rather than the usual
1 or 2 months time frame.

TDD is not used to find bugs, its used to design and implement the
application starting with a test.

It certainly prevents MOST bugs from happening - as the test code (which
is written first) must have a bug* which allows the application codes
bug to be undetected (i.e. not executed during a test run).

However, nothing can stop bugs from happening - it just helps to reduced
them, using preventative means.

The only time when TDD could be described as 'finding a bug'. Is
actually when you as a developer have found the bug manually, then
written a unittest to execute the same scenario. This test at first
fails because of the bug, then you fix the bug and the test passes.
Then because you have a test for this explicit bug, it should never
reappear.

*By bug, I mean it could be:-

eg1) A missing test scenario, and therefore the particular logic path
through the application code is not executed at test time.

eg2) The test doesn't assert anything and so finished with a success
state regardless of whether the thing under test should have failed.

eg3) ...



Relevant Pages

  • Re: Bug with Autolink in MSP 2003 standard SP2
    ... or doesn't work as it was designed to do, In this case, this is a design ... It can't be a bug as it works ... processes and schedule control logic, ... where you move A or B with respect to any other tasks, regardless of ...
    (microsoft.public.project)
  • Re: OT: Exchange (Was Re: OpenVMS - When downtime is not an option)
    ... application bug to provide access to protected data and/or provides ... the bugs *only* affected Exchange Server. ... Server* design flaw, not a Windows flaw. ... Microsoft product and those same designers and programmers have probably ...
    (comp.os.vms)
  • Re: pppd crashes, was: kde-freebsd
    ... User PPP is very easy to use, Kernel PPP is not. ... It appears to me that PPP is the more normal way on FreeBSD, whereas, in my own experience Linux, prefer PPPD. ... Over time FreeBSD and Linux drifted apart on this design issue, and it became something of a characteristic of BSD, perhaps that is why Kernel PPP became less well maintained ... Regarding the various comments by Michael Nottebrock, Firstly: The bug you mentioned I have not experienced. ...
    (freebsd-stable)
  • Re: Off switch blues
    ... it's not a feature it's a bug. ... like, consider a design bug. ... sleep, close the lid, and unplug the keyboard, it's because I intend to ... I don't intend for it to wake back up until I open the ...
    (comp.sys.mac.system)
  • Re: What Happened to Grundig?
    ... improve the original Sony design. ... Regarding how Grundig came to use the Sony design, ... Correcting the bug only realizes what the design ...
    (rec.radio.shortwave)