You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@buildr.apache.org by Assaf Arkin <ar...@intalio.com> on 2008/08/16 05:15:41 UTC
Buildr test overage reports
http://people.apache.org/~assaf/buildr/coverage/
Re: Buildr test overage reports
Posted by lacton <la...@users.sourceforge.net>.
On Mon, Aug 18, 2008 at 11:54 PM, Assaf Arkin <ar...@intalio.com> wrote:
> On Mon, Aug 18, 2008 at 2:50 PM, lacton <la...@users.sourceforge.net> wrote:
>> I'm glad to report I'm getting 100% code coverage for both
>> cobertura.rb and emma.rb with the pending new tests!
>>
>> Yet, I'm feeling these figures are somewhat optimistic. We don't know
>> the path coverage, which would probably be lower.
>
> It measures line coverage, but not every possible execution path:
>
> http://www.pervasivecode.com/blog/2007/07/11/rcov-c0-line-coverage-more-generous-than-emmas-c1-bytecode-coverage/
Very clear and informative article. Thank you.
Lacton
> Assaf
Re: Buildr test overage reports
Posted by Assaf Arkin <ar...@intalio.com>.
On Mon, Aug 18, 2008 at 2:50 PM, lacton <la...@users.sourceforge.net> wrote:
> On Mon, Aug 18, 2008 at 12:28 AM, Assaf Arkin <ar...@intalio.com> wrote:
>> On Sun, Aug 17, 2008 at 4:15 AM, lacton <la...@users.sourceforge.net> wrote:
>>> One thing I don't understand is how rcov chooses which ruby files
>>> should be included in the test coverage report. For instance, why
>>> does it exclude the addon directory?
>>
>> Actually, things are in addon because they don't have much (read: any)
>> test coverage :-)
>>
>> spec/spec_helpers.rb includes lib directory in $LOAD_PATH, and then
>> loads all of buildr so rcov knows to analyze these files. There are
>> no specs that load anything from addon, I know you have a few, I'm
>> guessing without including addon in $LOAD_PATH, so the tested code
>> probably comes from the gem directory, and that gets excluded.
>
> I'm glad to report I'm getting 100% code coverage for both
> cobertura.rb and emma.rb with the pending new tests!
>
> Yet, I'm feeling these figures are somewhat optimistic. We don't know
> the path coverage, which would probably be lower.
It measures line coverage, but not every possible execution path:
http://www.pervasivecode.com/blog/2007/07/11/rcov-c0-line-coverage-more-generous-than-emmas-c1-bytecode-coverage/
Assaf
>
> Lacton
>
>> Assaf
>
Re: Buildr test overage reports
Posted by lacton <la...@users.sourceforge.net>.
On Mon, Aug 18, 2008 at 12:28 AM, Assaf Arkin <ar...@intalio.com> wrote:
> On Sun, Aug 17, 2008 at 4:15 AM, lacton <la...@users.sourceforge.net> wrote:
>> One thing I don't understand is how rcov chooses which ruby files
>> should be included in the test coverage report. For instance, why
>> does it exclude the addon directory?
>
> Actually, things are in addon because they don't have much (read: any)
> test coverage :-)
>
> spec/spec_helpers.rb includes lib directory in $LOAD_PATH, and then
> loads all of buildr so rcov knows to analyze these files. There are
> no specs that load anything from addon, I know you have a few, I'm
> guessing without including addon in $LOAD_PATH, so the tested code
> probably comes from the gem directory, and that gets excluded.
I'm glad to report I'm getting 100% code coverage for both
cobertura.rb and emma.rb with the pending new tests!
Yet, I'm feeling these figures are somewhat optimistic. We don't know
the path coverage, which would probably be lower.
Lacton
> Assaf
Re: Buildr test overage reports
Posted by Assaf Arkin <ar...@intalio.com>.
On Sun, Aug 17, 2008 at 4:15 AM, lacton <la...@users.sourceforge.net> wrote:
>>> Is there a rake task to generate this report?
>>
>> rake rcov
>
> OK.
>
> By the way, there's a '<<' missing on the 'task.spec_opts' in
> rakelib/rspec.rake.
Thanks, fixed.
>
>> It outputs to report/coverage and report/spec.html. I plan to
>> integrate that back into the site.
>
> That would be great.
>
> One thing I don't understand is how rcov chooses which ruby files
> should be included in the test coverage report. For instance, why
> does it exclude the addon directory?
Actually, things are in addon because they don't have much (read: any)
test coverage :-)
spec/spec_helpers.rb includes lib directory in $LOAD_PATH, and then
loads all of buildr so rcov knows to analyze these files. There are
no specs that load anything from addon, I know you have a few, I'm
guessing without including addon in $LOAD_PATH, so the tested code
probably comes from the gem directory, and that gets excluded.
Assaf
>
> Lacton
>
>> Assaf
>
Re: Buildr test overage reports
Posted by lacton <la...@users.sourceforge.net>.
>> Is there a rake task to generate this report?
>
> rake rcov
OK.
By the way, there's a '<<' missing on the 'task.spec_opts' in
rakelib/rspec.rake.
> It outputs to report/coverage and report/spec.html. I plan to
> integrate that back into the site.
That would be great.
One thing I don't understand is how rcov chooses which ruby files
should be included in the test coverage report. For instance, why
does it exclude the addon directory?
Lacton
> Assaf
Re: Buildr test overage reports
Posted by Assaf Arkin <ar...@intalio.com>.
On Sat, Aug 16, 2008 at 5:00 AM, lacton <la...@users.sourceforge.net> wrote:
> On Sat, Aug 16, 2008 at 5:15 AM, Assaf Arkin <ar...@intalio.com> wrote:
>> http://people.apache.org/~assaf/buildr/coverage/
>
> That's a lot of green! :-)
>
> Is there a rake task to generate this report?
rake rcov
It outputs to report/coverage and report/spec.html. I plan to
integrate that back into the site.
Assaf
>
> Lacton
>
Re: Buildr test overage reports
Posted by lacton <la...@users.sourceforge.net>.
On Sat, Aug 16, 2008 at 5:15 AM, Assaf Arkin <ar...@intalio.com> wrote:
> http://people.apache.org/~assaf/buildr/coverage/
That's a lot of green! :-)
Is there a rake task to generate this report?
Lacton