You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@qpid.apache.org by Martin Ritchie <ri...@apache.org> on 2008/10/01 11:21:17 UTC

Re: Tests, code quality and reviews.

2008/9/30 Rafael Schloming <ra...@redhat.com>:
> Aidan Skinner wrote:
>>
>> Dearest All,
>>
>> We've had the more formal commit-then-review process for a few weeks
>> now. What we didn't really discuss was the standard to which commits
>> were to be held. So I'd like to take a minute, if you'll sit right
>> there, to tell you how we can become the prince of a town called
>> "adequate test coverage".
>>
>> Our unit test coverage is... poor. Our system test coverage is better.
>> You can get a decent idea of what our unit test coverage is by
>> downloading cobertura (http://cobertura.sourceforge.net/) and
>> unpacking it into qpid/java/lib/cobertura/ then running "ant
>> cover-test coverage-report" and looking in build/coverage/index.html.
>> It'll take a while to run because of the instrumentation, particularly
>> SerialTest which takes an age. Running that in an module will put the
>> coverage report for that module in build/<module>/coverage/index.html
>> which is helpful.
>>
>> To improve this situation, I'd like to propose that not having a test
>> case that covers your change is grounds for rejecting the patch. We
>> certainly can't get better if we continue to make the situation worse.
>>
>> Thoughts?
>
> +1
>
> --Rafael

+1 from me to. We can't expect to have better code if we don't at
least try and test what we are writing.


-- 
Martin Ritchie

Re: Tests, code quality and reviews.

Posted by Alan Conway <ac...@redhat.com>.
On Wed, 2008-10-01 at 10:21 +0100, Martin Ritchie wrote:
> 2008/9/30 Rafael Schloming <ra...@redhat.com>:
> > Aidan Skinner wrote:
> >>
> >> Dearest All,
> >>
> >> We've had the more formal commit-then-review process for a few weeks
> >> now. What we didn't really discuss was the standard to which commits
> >> were to be held. So I'd like to take a minute, if you'll sit right
> >> there, to tell you how we can become the prince of a town called
> >> "adequate test coverage".
> >>
> >> Our unit test coverage is... poor. Our system test coverage is better.
> >> You can get a decent idea of what our unit test coverage is by
> >> downloading cobertura (http://cobertura.sourceforge.net/) and
> >> unpacking it into qpid/java/lib/cobertura/ then running "ant
> >> cover-test coverage-report" and looking in build/coverage/index.html.
> >> It'll take a while to run because of the instrumentation, particularly
> >> SerialTest which takes an age. Running that in an module will put the
> >> coverage report for that module in build/<module>/coverage/index.html
> >> which is helpful.
> >>
> >> To improve this situation, I'd like to propose that not having a test
> >> case that covers your change is grounds for rejecting the patch. We
> >> certainly can't get better if we continue to make the situation worse.
> >>
> >> Thoughts?
> >
> > +1
> >
> > --Rafael
> 
> +1 from me to. We can't expect to have better code if we don't at
> least try and test what we are writing.
> 
> 

+1 - only case where a test is not absolutely needed is a pure refactor,
and even then you can always improve the existing tests :)