Autotest + TF2 Sound Effects = Epic Win
June 30th, 2009I have been using autotest (actually autospec and autofeature) for my development cycle for some time now, and I always felt like it was missing something. Then, one night while playing Team Fortress 2, I realized the the announcer’s taunts and encouragement really motivated me to continue and do better.
I thought this would be awesome for Test Driven Development. So I found some TF2 Sound files, and hacked up my .autotest file.Now when I go from red to green or green to red, I get a message from the TF2 announcer alerting me to my status.
I thought that sounds might be a bit annoying while developing, but this configuration only plays a sound when you go from green to red or vice versa, so it doesn’t play sounds constantly and it is actually very motivating.
I thought I would share my autotest setup for anyone else who would like a little more excitement in their TDD cycle.
This file has sounds off by default. To enable sounds, set the environment variable AUTOTEST_SOUNDS=true
It expects to have a directory ~/.autotest_media with the images (for growl notifications) and folders with sound files named success and failure with sound files to use for each state.
You can download my autotest media directory here
This media directory contains
- Pass and Fail Images (for growl)
- Failure Sounds
- “Do not fail me again”
- “Do not fail me this time”
- “You failed! Prepare for sudden death”
- “You failed! Stalemate!”
- “Failure!”
- “You FAILED”
- “You must not fail me again”
- “You must not fail me this time”
- Success sounds
- “Success!”
- “Time has been added”
- “Congratulations, we have been awarded additional time”
- “Success, we have been awarded additional time”
- “Additional time has been awarded”
- “We have succeeded”
Whenever a sound is triggered, it will play a random file out of the success or failure folders, so you can add, remove, or replace any sound files you wish.
Happy testing!
This autotest file and images are from the excellent Peepcode: RSpec Basics