As for the first-line (unit) tests: According to Michael Feathers ("Working Effectively with Legacy Code"), more than a few seconds to compile and test your class locally is too long (causing you to start cheating away from the TDD method).

The ultimate goal is to provide feedback while the details of the task are still in short term memory. According to some sources, the duration of short term memory can be as low as 15-30 seconds, so a target compile-and-test cycle of around 5-10 seconds would seem to be a well motivated and rational answer.

Unfortunately, practical considerations make this target exceedingly difficult to achieve without considerable engineering effort. It is my hope that future development automation tools will help with the difficult tasks of fine-grained dependency analysis, compilation unit and test case selection.