What happens now:

1)  Run tests
2)  Test fails
3)  Look at diagnostics
4a) If its enough information, fix the bug
4b)  If not, run test in the debugger
5b)  Continue to the point where the test failed
6b)  Gather necessary info
7b)  Fix the bug

I want to eliminate 4b and 5b from this process.

One could write a module so that when a test fails it drops you into the 
debugger so you can immediately debug the failure.  It would also set a
breakpoint on the failing test so you can rerun the test (ie. R) and 
already have the appropriate breakpoint set.

Likely you'd control if you wanted this behavior with 
HARNESS_PERL_SWITCHES=-MTest::AutoDebug

This can be implemented, currently, by adding a post hook onto 
Test::Builder->ok() with Hook::LexWrap or Sub::Uplevel.  I'm considering
future versions of Test::Builder to offer some sort of event subscriber
system so people can more easily do this sort of thing.

 
-- 
Michael G Schwern        [EMAIL PROTECTED]  http://www.pobox.com/~schwern/
Cuius rei demonstrationem mirabilem sane detexi hanc subscriptis 
exiguitas non caperet.

Reply via email to