Testivus (for the Rest of Us) and the Testing Gene

The esteemed Sebastian Bergmann, author of PhpUnit, makes a great comment in my earlier post on testing and ravioli code.

In the comment, he links to the Testivus Manifestivus from Alberto Savoia, which is about as non-dogmatic about testing as you can get, while still highlighting the importance of testing. You should read the whole thing, but here are some of the highlights.

Less testing dogma, more testing karma

Dogma can be informally described as authoritative principles, beliefs, often considered to be absolutely true. Testivus tries to keep testing dogma to a minimum. What works for some people sometimes, may not work for some other people, or even the same people at some other time.

Karma, on the other hand, can be informally explained as: “Do good things, and good things will happen to you.” We believe that writing and running tests is a good thing so if you write and run tests good things will happen to you … well perhaps just to your code.

We’d like to say that this is the central tenet of Testivus, but calling something a tenet would be too dogmatic.

Any tests are better than no tests

Self-explanatory and inspired by Martin Fowler, who once wrote “Imperfect tests, run frequently, are much better than perfect tests that are never written at all”.

Savoia follows with “Testing beats debugging”, “Test first, during, or after – whatever works best for you”, “If a method, technique, or tool, gives you more or better tests use it”. While I may have issues with test-first and TDD, I am fully in support of Testivus.

What’s intersting about Testivus is that it is the result of an earlier Savoia post about susceptibility to test-infection. That entry from Savoia is good too; he seems to approach things from a “how do people actually work” point of view, rather than “what would a perfect mode of working be”. Strongly suggest you read it, if only to determine if you are a T1, T2, or T3 (I think of myself as in the T2 camp). TDD dogmatists (hi Noel Darlow!) take note: for whatever reason, some people are highly resistant to test-first, and airs of moral superiority and/or condescension do little to help your cause among the T2 and T3.

Update (2007-08-19): Alberto Savoia in the comments below notes that there are new extended versions of the Testivus Manifestivus.

Thanks for the new links.

Are you stuck with a legacy PHP application? You should buy my book because it gives you a step-by-step guide to improving your codebase, all while keeping it running the whole time.

3 thoughts on “Testivus (for the Rest of Us) and the Testing Gene

  1. What concerns me is that your article creates the impression that TDD is an over-hyped dogma. I think this is unfair to those who promote testing and actively harmful to those who are trying to learn how to program. You should apologise, we can forget all about it, and start talking about code instead.

  2. Hi Noel —

    I’m sorry if it creates that impression; one may infer that, I guess, but that is not my implication. I think is was Karl Popper who said that “it is impossible to speak in a way so that you cannot be misunderstood.” TDD may not be a dogma, but I think we can agree that developers can be dogmatic about TDD.

    There is a difference between “promoting testing” and “promoting TDD and test-first”. I am all in favor of testing, but TDD and test-first are not very compelling to me yet. It is entirely possible I will modify my position in the future, as I did on errors-vs-exceptions for example, but your comments so far have not proved motivational.

    As to whether we should “start talking about code instead” — it’s my blog, I’ll talk about what I like. You are free to comment or not, as you wish, or to start your own blog and write there about how terribly wrong and unfair I am.

  3. Very interesting blog and discussions. Glad I found it.

    As the author of Testivus, I am glad you like, but you should read and link to the latest (much expanded) version. I have done quite a bit of thinking and writing since the first blog on Artima which is what you are linking to.

    Here’s the second blog:


    And here’s a link to “The Way of Testivus” in PDF parchment and suitable for framing :-).


    Keep up the good work and the interesting blogs!


Leave a Reply

Your email address will not be published. Required fields are marked *