When tests fail: a human comedy in one act.

nkuitse on 2003-08-14T17:01:17

Curtain rises. The sun sets slowly over a snowy countryside...

CHORUS, chanting offstage:

Running package tests,
Many eyes gaze on failure;
Few understand why.

Enter FORLORN LITTLE GIRL, in rags:

What happens when a test fails? How do we respond?

Enter chorus in confusion:

  • Panic. The deadline loometh and woe is me!
  • Indifference. Ça m'est égal.
  • Resignation. Oh well, so much for that package.

FORLORN LITTLE GIRL:

What happens when a test fails and the test's documentation explains what it was testing, why, and how?

CHORUS, regaining their confidence:

  • Enlightenment. Oh. Well, I don't really need that functionality anyhow.
  • Righteous anger. Silly package author doesn't know how to write %@#$*!? tests! Here, give me that keyboard!
  • Forgiveness. Yea, we have all written sinful code that fails in unexpected ways. Let me just whip up a patch to fix this...

FORLORN LITTLE GIRL:

Who writes documentation for their tests?

CHORUS, muttering angrily and casting eyes accusingly from side to side:

Do you? Do you? And you? Do you? Hey you over there! How about you?

Enter THE AUTHOR, blushing:

Ah, the shame! But I'll change, you'll see!

CHORUS, softening their rebuke:

Tests should be documented using POD, just like any other Perl code.

Exit THE AUTHOR.

FORLORN LITTLE GIRL:

I think we've all learned an important lesson today.

Un ange passe.

CHORUS exits, embarrassed:

(Cough.)