The Searduino project (Savannah page) provides an, albeit limited, simulation of an Arduino system. The system is limited in the sense that it does not (at the moment) support shields. It does, however, provide mechanisms for automated testing, a simulated environment, and the ability to record rapid series of events for later analysis.
The tool is open source and aims to scratch an itch of educators using Arduino. Enabling the students to prepare for labs without needing access to hardware, as well as providing useful tips (ever forgot to set the mode of a pin?) instead of hours of debugging, the goal is to make one of the most available platforms around even more available.