<div class="gmail_quote">+1 </div><div class="gmail_quote"><br></div><div class="gmail_quote">On Wed, Oct 3, 2012 at 10:41 AM, David Cole <span dir="ltr"><<a href="mailto:david.cole@kitware.com" target="_blank">david.cole@kitware.com</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div class="im">On Wed, Oct 3, 2012 at 8:35 AM, Nikhil Shetty <<a href="mailto:nikhil.shetty@kitware.com">nikhil.shetty@kitware.com</a>> wrote:<br>
> Hi Bill,<br>
><br>
> Are you planning to bring in some type of Unit Testing into VTK?<br>
><br>
> Currently each tests in VTK tests a bunch of different classes spread across<br>
> different modules. An obvious disadvantage is that some parts of the code<br>
> keeps getting tested multiple times which is sort of pointless (in terms of<br>
> testing). With unit testing one could just focus on one class at at time.<br>
><br>
<br>
</div>+1 for unit tests...<br>
<br>
BUT:<br>
testing multiple times is not pointless -- there are limitless<br>
possibilities of "combinations of stuff" -- and only with certain<br>
combinations will you find some problem cases.<br>
<br>
Testing as much as you have resources for (but no more) is ALWAYS a good idea.<br>
<br>
Both are useful.<br>
<div class="HOEnZb"><div class="h5"><br></div></div></blockquote><div> </div><div>Definitely Agree.</div><div> </div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div class="HOEnZb">
<div class="h5">
<br>
> Also a unit testing approach may be good for focused coverage where one is<br>
> focused on improving coverage on a limited set of classes.<br>
><br>
> There are many unit test frameworks out there. CppUnit seem to a good one.<br>
><br>
> -Nikihl<br>
><br>
> On Tue, Sep 18, 2012 at 5:43 PM, Bill Lorensen <<a href="mailto:bill.lorensen@gmail.com">bill.lorensen@gmail.com</a>><br>
> wrote:<br>
>><br>
>> My main concern is that vtk coverage is very low, and unacceptable.<br>
>><br>
>> I would rather spend time on improving the coverage. If others want to<br>
>> improve the process, that is great. Past experience shows that too much time<br>
>> is spent on testing process and too little on actual testing.<br>
>><br>
>> I say go for it, but I will concentrate in test coverage.<br>
>><br>
>> Bill<br>
>><br>
>><br>
>> On Tue, Sep 18, 2012 at 5:34 PM, David Doria <<a href="mailto:daviddoria@gmail.com">daviddoria@gmail.com</a>> wrote:<br>
>>><br>
>>> On Tue, Sep 18, 2012 at 4:23 PM, Bill Lorensen <<a href="mailto:bill.lorensen@gmail.com">bill.lorensen@gmail.com</a>><br>
>>> wrote:<br>
>>> > Folks,<br>
>>> ><br>
>>> > I mentioned earlier that my Fall/Winter VTK project is improving code<br>
>>> > coverage.<br>
>>> ><br>
>>> > I'm starting with some low hanging fruit, namely Common/Core which has<br>
>>> > 19<br>
>>> > files flagged by cdash as low coverage:<br>
>>> > <a href="http://open.cdash.org/viewCoverage.php?buildid=2568829" target="_blank">http://open.cdash.org/viewCoverage.php?buildid=2568829</a><br>
>>> ><br>
>>> > For example I just pushed this topic to gerrit that addresses testing<br>
>>> > for<br>
>>> > vtkTimePointUtilities, a class that has 0 coverage. I'm pretty sure<br>
>>> > there<br>
>>> > are bugs in this code, mainly surrounding boundary conditions that<br>
>>> > would not<br>
>>> > affect its usage, whatever that may be.<br>
>>> > <a href="http://review.source.kitware.com/#/t/1295/" target="_blank">http://review.source.kitware.com/#/t/1295/</a><br>
>>> ><br>
>>> > But rather than rant, I'll ask the community to review the gerrit<br>
>>> > topics.<br>
>>> ><br>
>>> > Bill<br>
>>><br>
>>> This sounds like a great project.<br>
>>><br>
>>> If you are going to be adding tons of tests, can we discuss a<br>
>>> standardized format for them? The current method of putting everything<br>
>>> in Test[TestName]() seems very error prone (accidental use of<br>
>>> previously defined variables, name clashes, etc) and is definitely<br>
>>> hard to read. I have pushed a new patch set that breaks some things<br>
>>> out into functions. Is there any problem with doing it like this? It<br>
>>> seems much more readable to me. In this case these functions are all<br>
>>> void (because the content doesn't get checked for failure anyway), but<br>
>>> of course they could return 'int' so that 'return EXIT_SUCCESS' could<br>
>>> be ANDed with the other tests to produce the final test return value.<br>
>>><br>
>>> Thoughts?<br>
>>><br>
>>> David<br>
>><br>
>><br>
>><br>
>><br>
>> --<br>
>> Unpaid intern in BillsBasement at noware dot com<br>
>><br>
>><br>
>> _______________________________________________<br>
>> Powered by <a href="http://www.kitware.com" target="_blank">www.kitware.com</a><br>
>><br>
>> Visit other Kitware open-source projects at<br>
>> <a href="http://www.kitware.com/opensource/opensource.html" target="_blank">http://www.kitware.com/opensource/opensource.html</a><br>
>><br>
>> Follow this link to subscribe/unsubscribe:<br>
>> <a href="http://www.vtk.org/mailman/listinfo/vtk-developers" target="_blank">http://www.vtk.org/mailman/listinfo/vtk-developers</a><br>
>><br>
>><br>
><br>
><br>
> _______________________________________________<br>
> Powered by <a href="http://www.kitware.com" target="_blank">www.kitware.com</a><br>
><br>
> Visit other Kitware open-source projects at<br>
> <a href="http://www.kitware.com/opensource/opensource.html" target="_blank">http://www.kitware.com/opensource/opensource.html</a><br>
><br>
> Follow this link to subscribe/unsubscribe:<br>
> <a href="http://www.vtk.org/mailman/listinfo/vtk-developers" target="_blank">http://www.vtk.org/mailman/listinfo/vtk-developers</a><br>
><br>
><br>
</div></div></blockquote></div><br>