On 17 Dec 2006, at 20:46, Nadim Khemir wrote:
[snip]
The first problem I have is capturing the module output when it is loaded.
I tried:
[snip]

You might want to look at Test::Output for this.

[snip]
I will also have a bunch of tests that need to be run under the debugger.
[snip]

Why? (he asks curiously :-)

[snip]
To get a 100% coverage I had to run this test:

dies_ok
        {
        Bum::Config::new () ;
        } "invalid constructor" ;

How do you guys test this?
[snip]

That's a reasonably thing to do if that's the behaviour you're interested in. If I was throwing some kind of structured exception I might use throws_ok and test for it explicitly - but dies_ok is fine if any-old-exception is what you want to happen.

Personally I wouldn't get /too/ hung up about 100% test coverage - it can be taken too seriously. See Brian Marick's "How to Misuse Code Coverage" <http://www.testing.com/writings/coverage.pdf> for example.

[snip]
A propos coverage, I have a module (Text:::Vip) that fiddles quite a lot with
member subs, adding them dynamicaly. The more tests I added, the least
coverage I got!
[snip]

Not personally :-) Never having delved into the guts to D::C my guess would be that you're generating new subs and only every testing part of the new sub - so you're creating more uncovered code than not... Without seeing the code it's hard to tell :)

Cheers,

Adrian

Reply via email to