Hi, I spend a rather large amount of time writing and running tests. There are a few things that could be better. I either don't know how or it may not possible. I thought we could share some of questions and ideas that can make working with tests more pleasent. This should go into a Q&A I guess.
- 'list of failed' is not very usefull Failed Test Stat Wstat Total Fail List of Failed ------------------------------------------------------------------------------- t/010_shared_variables.t 1 256 12 1 11 Scroll up, look at the errors, scan the text for a line number, fix the error. The error index given in the summary is almost never used. I think it would be better to get the test line. Is there a way to do that in the current harness, in the future harness? Names would be best of course. hmm, maybe nothing would be best. - Colors in test outputs: TAP::Harness::Color is nice but Module::Build doesn't use it. Has someone plans to put it in? - Too much output: My desktop is my IDE (sometimes my terminal is my IDE) and I like it that way, IDE's are too often in the way (or eating 1 GB of memory and cpu cycles (Eclipse)) but I must admit that when there are lots test of failures I would have liked to see the test results organized instead for having a thousands of lines dump. How do you guys cope? - Coverage per test: Is there a way to get that? -Idea: I, sometimes, write my code in the test files. ->>>> file A.pm: package A ; sub s1 { s2() } ; file t/00X_test.t package A ; use Test::More ; sub s2 { ......, diag, .....} package main ; # all the usuall testing -<<<< That's very handy but it also shows a pattern. Debugging code that has tests versus debugging code that you would normally run or run in the debugger. I don't want to have yet another framework, everything is setup in the test but the test steals my output so I have to 'diag' things out. Any other way you know of? Cheers, Nadim.