I wrote an Eclipse plugin that turns Eclipse's built-in JUnit runner into a music box. The following video
Each test class is assigned one of seven chords in the key of C major. The assignment is deterministic, so a particular sequence of tests will play the same "song". Passing test methods play a pleasing arpeggio, while failing tests play an ugly dissonant chord. The time each test method takes to execute determines the speed of the music. If more than one test class runs, then the music resolves to the tonic at the end of the session.
Here is the plugin (including source code). To try it out, simply save the .jar file in Eclipse's
plugins directory and restart Eclipse. I tested it in Eclipse version 3.4.0 running on JDK 6. The plugin requires MIDI, so if you do not hear any sound when running JUnit tests, your computer probably lacks an appropriate MIDI device or it is configured incorrectly. Try running this simple class to test your MIDI setup.
I am not the first to think of making JUnit play music. There is a
Update Thursday, February 25, 2010
I posted the code on