The Artima Developer Community
Sponsored Link

Agitating Thoughts & Ideas
Testivus - Testing For The Rest Of Us
by Alberto Savoia
February 6, 2007
Summary
Developers need to take more responsibility for testing their code. But the majority of developers are not willing, nor ready, nor able to jump on the bandwagon of the more extreme and demanding developer testing movements such as Test Driven Development. Testivus is a proposed developer testing movement "for the rest of us".

Advertisement

In a recent blog, I shared my belief that when it comes to testing their own code developers fall into three basic categories based on how susceptible they are to becoming test-infected. T1 developers take to testing like ducks to water. T2 developers need some time and encouragement but eventually get it, and testing becomes a normal part of their development work-flow. T3 developers, on the other hand, seem to have an immunity to test infection. I also shared a personal observation that T3 developers appear to outnumber T1 and T2 developers combined.

The post triggered a bunch of interesting comments and follow-on discussions. One sentence in one of the comments, however, was particularly striking to me. Mike Kaufman wrote:

“Maybe we need a ‘testing for the rest of us’ movement’”

His comment got my attention for two reasons.

First, as a fan of the Seinfeld TV show, the sentence “testing for the rest of us”, reminded me of one hilarious episode where one of the characters, fed up with the dogma, commercialism, pressures, etc., associate with the holiday season, creates an alternative holiday: Festivus, the festival for the rest of us. The idea of Festivus must have struck a chord with people because, since the show aired, it acquired a life of its own. A growing number of people now celebrate Festivus (at my company, Agitar, our holiday picnic is called Festivus and is modeled after it). There are books and websites dedicated to the subject and some entrepreneurs sell Festivus items – including the famous Festivus aluminum pole (the alternative to the Christmas tree).

Second, and more importantly, I have seen enough evidence that the motivation, practices, tools, and expectations that work well for T1 developers and, with some effort and persistence, can be embraced by T2s, are simply too much to swallow for T3. Most developers admit that they should play a more active role in testing, but they are not ready to take the big steps, or commit to the degree of change and amount of time that the more publicized developer testing practices, such as TDD, require. They need a simpler, more gradual, less extreme and less dogmatic approach. They need Testivus – the testing movement for the rest of us.

I told Mike Kaufman that we should take his idea of a testing movement for the rest of us to the next level but, unfortunately, he currently does not have the cycles to dedicate to it. However, after expressing some reservations about the term festivus (“Not sure the term ‘testivus’ sounds too smart” – and he’s probably right), he said he’d be happy if I carried the testing-for-the-rest-of-us torch, and would be impressed if we got something rolling.

It is in that spirit that I present to you the first draft of The Testivus Manifestivus, the testing manifesto for the rest of us.

The following Manifestivus is obviously rough and incomplete (feel free to propose changes and addition). Consider it a starting point for discussion.

The Testivus Manifestivus

(First Draft)

Less testing dogma, more testing karma

Any tests are better than no tests

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

Below are quick explanations of the current Manifestivus points:

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”.

Testing beats debugging

If you like debugging, developer testing may not be for you. Most people who start practicing developer testing find that they spend much less time using the debugger. We believe that time invested writing and running tests is better than time spent debugging.

Sue Spielman wrote an amusing and clever “Dear John” letter to her debugger after she started practicing developer testing:

Test first, during, or after – whatever works best for you

Test Driven Development is a very clever idea with a lot of merit and strong supporters, but we realize that it’s not everybody’s cup of tea. The earlier you test, the better it is, but even tests written after you think the code is done are better than no tests at all. Do what works for you.

If a technique, metric, or tool, gives you more or better tests use it

Even among T1s there is disagreement on the benefits of certain testing techniques (e.g. using mock objects and to what extents), metrics (e.g. using code coverage), and tools (e.g. automated test generation). Don’t get caught up in those arguments. If something works for you, and makes your testing easier, more efficient, or more fun, just use it.

There you go. What do you think? Does the idea of Testivus movement make sense to you? If so, what should our Manifestivus say, and what should we do to promote it?

Talk Back!

Have an opinion? Readers have already posted 51 comments about this weblog entry. Why not add yours?

RSS Feed

If you'd like to be notified whenever Alberto Savoia adds a new entry to his weblog, subscribe to his RSS feed.

About the Blogger

Alberto Savoia is founder and CTO at Agitar Software, and he has been life-long agitator and innovator in the area of software development and testing tools and technology. Alberto's software products have won a number of awards including: the JavaOne's Duke Award, Software Development Magazine's Productivity Award, Java Developer Journal's World Class Award, and Java World Editor's Choice Award. His current mission is to make developer unit testing a broadly adopted and standar industry practice rather than a rare exception. Before Agitar, Alberto worked at Google as the engineering executive in charge of the highly successful and profitable ads group. In October 1998, he cofounded and became CTO of Velogic/Keynote (NASD:KEYN), the pioneer and leading innovator in Internet performance and scalability testing. Prior to Velogic, Alberto had 13-year career at Sun Microsystems where his most recent positions were Founder and General Manager of the SunTest business unit, and Director of Software Technology Research at Sun Microsystems Laboratories.

This weblog entry is Copyright © 2007 Alberto Savoia. All rights reserved.

Sponsored Links



Google
  Web Artima.com   

Copyright © 1996-2014 Artima, Inc. All Rights Reserved. - Privacy Policy - Terms of Use - Advertise with Us