BT

Facilitating the Spread of Knowledge and Innovation in Professional Software Development

Write for InfoQ

Topics

Choose your language

InfoQ Homepage News Archeology: Testing Sacred Text Found

Archeology: Testing Sacred Text Found

Alberto Savoia of Agitar Software has found and translated for the Artima Blog an ancient treasure: "The Way of Testivus - Unit Testing Wisdom From An Ancient Software Start-up," which turned out to be some good advice on developer and unit testing, packaged as twelve fake, pretentious, and somewhat cryptic bits of ancient Eastern wisdom  - but good for a laugh.

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:
“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?
The article includes the full text of The Way of Testivus, including explanations and profound poetry for each of the 12 principles:

If you write code, write tests.
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.

Rate this Article

Adoption
Style

BT