1. Achievement Unlocked

    [This post is adapted from a lightning talk I gave at the Testing in Python Birds-of-a-Feather session at PyCon 2010.]

    One of those most fun advancements in video games in recent years is not about the improved graphics, or playing with hundreds of people at once. It’s that games have evolved beyond points. While a good point system may be a good indicator of a player’s abilities, it doesn’t tell the whole story. Many modern games, even if they don’t involve points, have introduced the concept of achievements. Achievements are awarded for completing game-specific challenges—essentially, they are merit badges.

    Examples

    From Team Fortress 2:

    From The Beatles: Rock Band:

    From foursquare:

    These add another level of fun to the games in question. I think it’s about time we stole this idea for software testing.

    Testing Achievements

    To make this happen, I announced an Achievements plugin for nose, the Python test runner. Here are a few highlights:

    Night Shift
    Make a failing test suite pass between midnight and 5am.

    Punctuality
    Make a failing test suite pass at 9am.

    Coffee Break
    The test suite takes between 5 and 15 minutes to run.

    Happy Ending
    All tests in the suite fail…except the last.

    My God, It’s Full of Dots
    The suite has at least 2,001 passing tests.

    Sausage Fingers
    At least two distinct syntax errors are raised by the test suite.

    Are You Mocking Me?
    Import a mocking library.

    100% Code Coverage, Level x
    100% of at least 2(x+7) statements are executed.

    You can view the full list of achievements here. Many of these are working right now.

    Next Steps

    Announcing unlocked achievements on Twitter or IRC, global or project-specific leaderboards, pluggable achievement expansion packs…

    Share your ideas in the comments!

Vignelli theme by Robbie Manson