librelist archives

« back to archive

Test coverage?

Test coverage?

From:
Kelly Leahy
Date:
2011-05-11 @ 04:16
Being a TDD kindof guy, and figuring this might be the best way to learn the
library, I was thinking I could probably help out with writing some tests
for the existing functionality that may not be tested.

However, I'm not sure where would be the easiest place to start.  Does
anybody have any recommendations?  I'll have about 4-8 hours to work on this
project a week, mostly the second half of the day on Fridays, so I'm going
to try to figure out what work I can queue up and knock out on a friday
afternoon for inclusion into the codebase (if the benevolent dictators
decide so) ;)

Thanks,
Kelly

Re: [libgit2] Test coverage?

From:
Colton Myers
Date:
2011-05-11 @ 17:56
Kelly,

I'm sure Vicent or someone else will probably reply, because I'm sure that
there are tests to be written.  A couple of friends and I have been
implementing the diff functionality for the library, and as part of that
I've been looking into the existing framework (in order to write tests for
our code).  I would suggest that if you want to get involved writing tests,
you should start going through the existing test framework, which is
location in the `tests` folder:
https://github.com/libgit2/libgit2/tree/development/tests

I found that for someone just looking into it, it can be quite confusing,
because so much of the framework is implemented using `#define`s.  If you
can get familiar with the existing framework, writing additional tests
should be fairly straightforward.

I'm not sure what tests need to be written, but more tests are almost always
a good thing, especially when written within an automated test framework,
like libgit2's.

-Colton

On Tue, May 10, 2011 at 10:16 PM, Kelly Leahy <kelly.p.leahy@gmail.com>wrote:

> Being a TDD kindof guy, and figuring this might be the best way to learn
> the library, I was thinking I could probably help out with writing some
> tests for the existing functionality that may not be tested.
>
> However, I'm not sure where would be the easiest place to start.  Does
> anybody have any recommendations?  I'll have about 4-8 hours to work on this
> project a week, mostly the second half of the day on Fridays, so I'm going
> to try to figure out what work I can queue up and knock out on a friday
> afternoon for inclusion into the codebase (if the benevolent dictators
> decide so) ;)
>
> Thanks,
> Kelly
>