Re: Code coverage with debug logs: 100% branch coverage not possible?...

2014-02-14 Thread jieryn
I have also been annoyed with what you describe, and have wondered how to fill the gap of missing coverage. Outside of copying the testcase and dynamically changing the log level inside of it, which in addition to being burdensome, also offends my DRY sensibility, the best idea I've had about

Re: Code coverage with debug logs: 100% branch coverage not possible?...

2014-02-13 Thread Baptiste Mathus
tested class with INFO traces activated:* -Message d'origine- De : paulus.benedic...@gmail.com [mailto:paulus.benedic...@gmail.com] De la part de Paul Benedict Envoyé : mercredi 12 février 2014 21:36 À : Maven Users List Objet : Re: Code coverage with debug logs: 100

Re: Code coverage with debug logs: 100% branch coverage not possible?...

2014-02-13 Thread Stephen Connolly
: paulus.benedic...@gmail.com [mailto: paulus.benedic...@gmail.com] De la part de Paul Benedict Envoyé : mercredi 12 février 2014 21:36 À : Maven Users List Objet : Re: Code coverage with debug logs: 100% branch coverage not possible?... IIRC, there should be an option in Emma

Re: Code coverage with debug logs: 100% branch coverage not possible?...

2014-02-13 Thread Stephen Connolly
: paulus.benedic...@gmail.com [mailto: paulus.benedic...@gmail.com] De la part de Paul Benedict Envoyé : mercredi 12 février 2014 21:36 À : Maven Users List Objet : Re: Code coverage with debug logs: 100% branch coverage not possible?... IIRC, there should be an option in Emma

Re: Code coverage with debug logs: 100% branch coverage not possible?...

2014-02-13 Thread Benoît Berthonneau
: paulus.benedic...@gmail.com [mailto: paulus.benedic...@gmail.com] De la part de Paul Benedict Envoyé : mercredi 12 février 2014 21:36 À : Maven Users List Objet : Re: Code coverage with debug logs: 100% branch coverage not possible?... IIRC, there should be an option in Emma/Cobertura that allows you

Code coverage with debug logs: 100% branch coverage not possible?...

2014-02-12 Thread Benoît Berthonneau
Hi all, I need your opinion/way to tackle the following problem: In many projects we use a Logger (doesn’t matter which implementation). It is often recommend to test if the debug level is activated before logging a debug trace like the following: if (logger.isDebugEnabled()) {

Re: Code coverage with debug logs: 100% branch coverage not possible?...

2014-02-12 Thread Paul Benedict
IIRC, there should be an option in Emma/Cobertura that allows you to exclude coverage on certain classes. So if you can exclude your log4j classes (you don't really want to test your logging, do you?), then you should be able to raise your percentage. On Wed, Feb 12, 2014 at 2:30 PM, Benoît

Re: Code coverage with debug logs: 100% branch coverage not possible?...

2014-02-12 Thread Reto Hablützel
To follow up on Paul's answer, I would go as far as to say that I test my code in order to feel comfortable that it actually does what it should do. Thus, I can very well live with 90% coverage if I know what the missing 10% are rather than testing for the sake of making a good impression with a

RE: Code coverage with debug logs: 100% branch coverage not possible?...

2014-02-12 Thread Benoît Berthonneau
[mailto:paulus.benedic...@gmail.com] De la part de Paul Benedict Envoyé : mercredi 12 février 2014 21:36 À : Maven Users List Objet : Re: Code coverage with debug logs: 100% branch coverage not possible?... IIRC, there should be an option in Emma/Cobertura that allows you to exclude coverage on certain classes. So

RE: Code coverage with debug logs: 100% branch coverage not possible?...

2014-02-12 Thread Kevin Krumwiede
List Objet : Re: Code coverage with debug logs: 100% branch coverage not possible?... IIRC, there should be an option in Emma/Cobertura that allows you to exclude coverage on certain classes. So if you can exclude your log4j classes (you don't really want to test your logging, do you

RE: Code coverage with debug logs: 100% branch coverage not possible?...

2014-02-12 Thread Benoît Berthonneau
2014 21:47 À : Maven Users List Objet : Re: Code coverage with debug logs: 100% branch coverage not possible?... To follow up on Paul's answer, I would go as far as to say that I test my code in order to feel comfortable that it actually does what it should do. Thus, I can very well live with 90

RE: Code coverage with debug logs: 100% branch coverage not possible?...

2014-02-12 Thread Benoît Berthonneau
With the pictures attached… De : Benoît Berthonneau [mailto:ben...@berthonneau.com] Envoyé : mercredi 12 février 2014 21:57 À : 'Maven Users List' Objet : RE: Code coverage with debug logs: 100% branch coverage not possible?... Hi Paul, Don't think that I could play with exclusions

Re: Code coverage with debug logs: 100% branch coverage not possible?...

2014-02-12 Thread Mirko Friedenhagen
: paulus.benedic...@gmail.com [mailto:paulus.benedic...@gmail.com] De la part de Paul Benedict Envoyé : mercredi 12 février 2014 21:36 À : Maven Users List Objet : Re: Code coverage with debug logs: 100% branch coverage not possible?... IIRC, there should be an option in Emma/Cobertura that allows

Re: Code coverage with debug logs: 100% branch coverage not possible?...

2014-02-12 Thread Ron Wheeler
de Paul Benedict Envoyé : mercredi 12 février 2014 21:36 À : Maven Users List Objet : Re: Code coverage with debug logs: 100% branch coverage not possible?... IIRC, there should be an option in Emma/Cobertura that allows you to exclude coverage on certain classes. So if you can exclude your log4j

Re: Code coverage with debug logs: 100% branch coverage not possible?...

2014-02-12 Thread Benoît Berthonneau
[mailto:paulus.benedic...@gmail.com] De la part de Paul Benedict Envoyé : mercredi 12 février 2014 21:36 À : Maven Users List Objet : Re: Code coverage with debug logs: 100% branch coverage not possible?... IIRC, there should be an option in Emma/Cobertura that allows you to exclude coverage on certain