Skip navigation.

Archives

A refactored assertion-based test oracle........for US presidents???

agile | heuristics | perspectives

An Assertion-based (also known as programmer tests in Test Driven Development) Test Oracle (an information source of what makes a test correct) was developed 27 years ago, well before TDD was thought of but probably around the time test oracles were thought of. That was also long before refactoring was thought of, simplifying the logic to its simplest form.

It was designed by US history professor Allan Lichtman and mathematician Volodia Keilis-Borok. It is 13 assertions (that is refactored all right) that can each be true or false, and has picked every US federal election result since 1984. If more than half of the assertions are true, the governing party will win, otherwise they will lose. The majority of the assertions first went false in early 2006, at which point Lichtman said “Long before the nomination contest unfolded, the Democrats could take a name out of a phone book and still win.” I guess they must have used a Chicago phone book, or maybe even a Brazilian one! (where there are now multiple Barack Obamas) This year the test oracle has evaluated False, but if we look at it vice-versa, True or even Yes we can! [grin]

If the test oracle is correct, newspapers will print this mock headline on Wednesday the 5th of November 2008. (There’s another agile word, mock!)