Smoke test

Tuesday 8 April 2003

We software engineers are familiar with the term "smoke test": it's a quick test you can run that verifies that the latest changes haven't broken something really big. But where does the term come from?

The most popular guess is from the old days of building electrical equipment, where a smoke test consisted of plugging the thing into the wall to see if it smoked. Another possibility comes from duct work, where to check air-tight-ness, smoke can be pumped in to see where it comes out. These are both reasonable and plausible origins, but I like the typographic answer best.

To get at the dervation, we need a little review of the history of typographic technology. Remember that type was originally (before 200 years ago) actual pieces of metal that were locked into a press, coated with ink, and pressed on paper. To get the correct-reading (forward) letter on the paper, the type had to have a reversed, raised image of the letter. The printer needed many identical pieces of type (because a book would have many separate instances of each letter), so they were cast in molds. To form the reversed raised image of the letter, the mold had a forward sunken image of the letter at the bottom. This was a piece of metal called a matrix, which was created by driving a specially-carved bar (called a punch) into a blank of brass. To make the matrix correctly, the punch had to have a reversed raised image of the letter (just like the final piece of type was to have). I know this is complex: pictures and other explanation are at Fireproof Design's Type page.

So the punch was the actual source for the shape of the letter. All the rest of the mechanical back-and-forth of punch to matrix to type to paper would eventually produce a printed image of many copies of the shape that was carved into the punch. But put yourself in the place of the poor punchcutter, the guy carving the end of a steel rod to look like a particular letter in a particular style. There you are, filing away at your "e", trying to achieve a certain effect. You're working on it reversed, and at actual size (have you ever considered just how tiny an 8-point "e" actually is)?

How do you test it? You can't go through all the steps of producing a matrix, casting some type, setting the type in the press, and printing off some sheets: it would take too long, and be too expensive, and too messy. You need a quicker test.

What the punchcutter would do is hold the end of the punch in the flame of a candle, where the smoke would blacken the end of the punch. Then he could make a simple impression on a piece of paper, and take a look at what he had. The original smoke test.

I like this derivation, not just because it involves type history (though that is a bonus). It nicely captures the intent of the smoke test. After all, the plug-it-in-and-see-if-it-smokes explanation is just a little too crude: that doesn't check the functioning of the equipment at all. The punchcutter's smoke test is a better analogy to what we expect from a software smoke test: it is quick and easy, and it verifies that the basic stuff is working. The punchcutter could see that the shape was coming out the way he wanted, and could even put two or more letters together to see how they interacted. He couldn't set a whole page, and he couldn't get the spacing precisely, but that was OK: it was only a smoke test.

Comments

[gravatar]
Brian 3:51 PM on 22 Apr 2003

Smoke-test:
Likely coined by ham radio operators as they move through the "building" phase of the activity. If your linear amp can't melt the skin off RG-8 coax, it wasn't worth the trouble to build. VE7APC

[gravatar]
jim 8:53 AM on 10 Jun 2004

By the typesetting derivation then, building a unit test along with the primary component so that you can test little parts of the functionality as you develop (to make sure you're still on the right path) is also smoke testing. Interesting. I had always used "Smoke Test" in the electronics sense of seeing if the magic smoke comes out (but, unlike in hardware, you can put the smoke back into a peice of software).

[gravatar]
Mike 9:02 AM on 10 Jun 2004

(but, unlike in hardware, you can put the smoke back into a peice of software).


Assuming your bug doesn't involve, let's say, an unlink(".") as root.


Not that I ever did that... :)

[gravatar]
Kent 10:18 AM on 10 Jun 2004

I can vouch for smoke testing electronics as a real test. You say that plug-it-in-and-see-if-it-smokes doesn't test anything, but I disagree. It is a key moment in the life of a new piece of electronics. It tests whether you have made any catastrophic wiring or design errors. Even with something as simple as rewiring a lamp, there is always that moment of applying power, wondering if there will be any sparks.

[gravatar]
Chris Lightfoot 2:48 PM on 10 Jun 2004

The OED thinks it's, "a method of testing the state of drains and pipes by means of smoke", though doesn't give a supporting quotation for the combination.

[gravatar]
andrew 3:52 PM on 10 Jun 2004

BTW, the acronym "BTT" means "back to top". You can touch a post and put BTT on it.

Add a comment:

name
email
Ignore this:
not displayed and no spam.
Leave this empty:
www
not searched.
 
Name and either email or www are required.
Don't put anything here:
Leave this empty:
URLs auto-link and some tags are allowed: <a><b><i><p><br><pre>.