[TIP] real world testing

David Stanek dstanek at dstanek.com
Fri Jul 3 10:48:56 PDT 2009


On Thu, Jul 2, 2009 at 5:37 AM, Noah Gift<noah.gift at gmail.com> wrote:
> I keep going back and forth in swings on very strict 100% code coverage vs
> solving problems quickly under 2 day deadlines.  I think so far the 2 day
> deadline approach wins.  My gut tells me that there is some new theory of
> testing that is a bit more real world then the testing Nazi
> approach.....especially in things like web development or film production.
>  Comments?
>

Testing and TDD in particular are about increasing confidence in your code.
They help to prove that code is working correctly and gives you a way to
check. It also gives you a safety net for refactoring.

Code coverage is not a very a good metric for your tests. It's very
misleading since current tooling only shows line coverage. Line coverage is
helpful for identifying when you are completely missing code, but not for
showing that all major possible conditions are covered.

I have to say that I am a practicing TDDer, but there are times when I do
cheat. Now that I have been doing it for a while I can't understand why I
would not do it. My current style is somewhere in between TDD and BDD.

-- 
David
blog: http://www.traceback.org
twitter: http://twitter.com/dstanek



More information about the testing-in-python mailing list