Subtitled "Less Unit Testing Dogma, More Unit Testing Karma," the article recounts the tale of a Himalayan expedition that uncovered an unprecedented text:
Among the many amazing things they discovered inside the cave was the most amazing thing: a note left by one of the programmers:The article includes the full text of The Way of Testivus, including explanations and profound poetry for each of the 12 principles:“We have finished the release ahead of schedule – again. All the tests pass, so we are taking the rest of the week off. We are going sailing.”What was the secret of these ancient programmers? The expeditioners searched each cubicle for clues. In addition to various Dilbert™ calendars, they found “The Way of Testivus”. Who wrote this mysterious booklet?
Is the content of this text responsible for these ancient programmers being able to complete projects ahead of schedule?
Don’t get stuck on unit testing dogma.
Embrace unit testing karma.
Think of code and test as one.
The test is more important than the unit.
The best time to test is when the code is fresh.
Tests not run waste away.
An imperfect test today is better than a perfect test someday.
An ugly test is better than no test.
Sometimes, the test justifies the means.
Only fools use no tools.
Good tests fail.
Here is just a sample from The Way of Testivus:
The pupil asked the master programmer:
“When can I stop writing tests?”
The master answered:
“When you stop writing code.”
The pupil asked:
“When do I stop writing code?”
The master answered:
“When you become a manager.”
The pupil trembled and asked:
“When do I become a manager?”
The master answered:
“When you stop writing tests.”
The pupil rushed to write some tests.
He left skid marks.
If the code deserves to be written,
it deserves to have tests.
Related news: Good Agile Karma by Gunjan Doshi & Deborah Hartmann.