in reply to Automating TDD

You can try out Devel::Command::Tdump to develop tests while in the debugger.