[vtk-developers] VTK Code Coverage

Nikhil Shetty nikhil.shetty at kitware.com
Wed Oct 3 08:35:19 EDT 2012


Hi Bill,

Are you planning to bring in some type of Unit Testing into VTK?

Currently each tests in VTK tests a bunch of different classes spread
across different modules. An obvious disadvantage is that some parts of the
code keeps getting tested multiple times which is sort of pointless (in
terms of testing). With unit testing one could just focus on one class at
at time.

Also a unit testing approach may be good for focused coverage where one is
focused on improving coverage on a limited set of classes.

There are many unit test frameworks out there. CppUnit seem to a good one.

-Nikihl

On Tue, Sep 18, 2012 at 5:43 PM, Bill Lorensen <bill.lorensen at gmail.com>wrote:

> My main concern is that vtk coverage is very low, and unacceptable.
>
> I would rather spend time on improving the coverage. If others want to
> improve the process, that is great. Past experience shows that too much
> time is spent on testing process and too little on actual testing.
>
> I say go for it, but I will concentrate in test coverage.
>
> Bill
>
>
> On Tue, Sep 18, 2012 at 5:34 PM, David Doria <daviddoria at gmail.com> wrote:
>
>> On Tue, Sep 18, 2012 at 4:23 PM, Bill Lorensen <bill.lorensen at gmail.com>
>> wrote:
>> > Folks,
>> >
>> > I mentioned earlier that my Fall/Winter VTK project is improving code
>> > coverage.
>> >
>> > I'm starting with some low hanging fruit, namely Common/Core which has
>> 19
>> > files flagged by cdash as low coverage:
>> > http://open.cdash.org/viewCoverage.php?buildid=2568829
>> >
>> > For example I just pushed this topic to gerrit that addresses testing
>> for
>> > vtkTimePointUtilities, a class that has 0 coverage. I'm pretty sure
>> there
>> > are bugs in this code, mainly surrounding boundary conditions that
>> would not
>> > affect its usage, whatever that may be.
>> > http://review.source.kitware.com/#/t/1295/
>> >
>> > But rather than rant, I'll ask the community to review the gerrit
>> topics.
>> >
>> > Bill
>>
>> This sounds like a great project.
>>
>> If you are going to be adding tons of tests, can we discuss a
>> standardized format for them? The current method of putting everything
>> in Test[TestName]() seems very error prone (accidental use of
>> previously defined variables, name clashes, etc) and is definitely
>> hard to read. I have pushed a new patch set that breaks some things
>> out into functions. Is there any problem with doing it like this? It
>> seems much more readable to me. In this case these functions are all
>> void (because the content doesn't get checked for failure anyway), but
>> of course they could return 'int' so that 'return EXIT_SUCCESS' could
>> be ANDed with the other tests to produce the final test return value.
>>
>> Thoughts?
>>
>> David
>>
>
>
>
> --
> Unpaid intern in BillsBasement at noware dot com
>
>
> _______________________________________________
> Powered by www.kitware.com
>
> Visit other Kitware open-source projects at
> http://www.kitware.com/opensource/opensource.html
>
> Follow this link to subscribe/unsubscribe:
> http://www.vtk.org/mailman/listinfo/vtk-developers
>
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://public.kitware.com/pipermail/vtk-developers/attachments/20121003/6ca43663/attachment.html>


More information about the vtk-developers mailing list