The Spawn of Stunt Programming - exorcising the demons in your tests

by Nicholas Clark (

The Spawn of Stunt Programming - exorcising the demons in your tests aimed at Any and is held in English. This talk starts on 2024-04-17 at 10:40 for 20 minutes. It takes place at the Room 1.

This is the followup to the stunt programming talk - remember

Don't do this at home.
Don't do this in production.
Don't do this in new code.
Don't do this for any longer than you have to.
Don't put it on YouTube for everyone to see...

So we ignored all of that advice and went ahead and created tests.
We used to have a bunch of command line scripts without tests, and no safe way to change them

Now we have tests, and we can slowly change those scripts without risking our salaries. Everything is better now, right? The deployed code certainly is...

But oh my, look at our test directory. Would you believe how complex it is to reliably override CORE::GLOBAL::open? All to inject contents for one file that one script opens. And then we do it again in a second copy because a second script needs a different file. And overriding readdir etc

Production is fine, but we're accumulating technical debt so quickly that there's the risk of a demonic portal opening next time CI runs - and I hate to think what the AWS bill for that service is...

So here is the next phase of the testing story - how we reduced the need for blunt override libraries by careful use of temporary directories, @INC ordering, log4perl configs and more.

(How much more is a small matter of Conference Driven Development, and how late my train is.)

Tags: testing

Interest in attending: