[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: Dpkg testing framework and Ubuntu's automated testing


    Thanks for the explanation, Russ. I wonder if you are also a test-obsessed
person ;-) Or perhaps that jargon actually serves some purpose...

On Sun, Oct 29, 2006 at 12:19:19AM -0700, Russ Allbery wrote:
> [...]
> Unit tests are useful because one can take the code apart well enough to
> simulate error conditions and weird inputs that might be difficult to
> construct via the public interface but which some internal bit of code
> should be able to handle (and because they're often easier to set up and
> reason about).

    Another good thing about unit tests is that they usually force you to
write code with clean APIs (or to refactor code so it has a clean API, if it's
legacy code that doesn't have one yet). The reason is that, otherwise, you
can't unit test it (or it's so difficult you just don't do it).

    So, you usually end up with _better code_ if you are unit testing it.

Esteban Manchado Velázquez <zoso@debian.org>
EuropeSwPatentFree - http://EuropeSwPatentFree.hispalinux.es
Help spread it through the Net in signatures, webpages, whatever!

Attachment: signature.asc
Description: Digital signature

Reply to: