Hi, Bill, <div>  A separate but related question:  What should be the default behavior of tests regarding "ERROR" strings in the standard output?  Currently, unless you explicitly do something like <span style="color:rgb(34,34,34)"><font face="courier new, monospace">set_tests_properties(.... PROPERTIES FAIL_REGULAR_EXPRESSION "Error")</font><font face="arial, sans-serif"> </font></span><span style="font-size:12.666666984558105px;color:rgb(34,34,34);font-family:arial,sans-serif">the tests will pass.  This seems a little dangerous to me.</span></div>
<div><div><font color="#222222" face="arial, sans-serif"><span style="font-size:12.666666984558105px"><br></span></font></div><div>Leo</div><div><font color="#222222" face="arial, sans-serif"><span style="font-size:12.666666984558105px"> </span></font><br>
<div class="gmail_quote">On Tue, Sep 4, 2012 at 2:58 PM, Bill Lorensen <span dir="ltr"><<a href="mailto:bill.lorensen@gmail.com" target="_blank">bill.lorensen@gmail.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">

Folks,<br><br>VTK's test code coverage is not very good. Currently it stands at<br>about 62% of the code. I think the pre/post modularization coverage<br>rates are similar.<br><br>One of the lessons we learned from ITK's modularization is that many<br>



of the ITK tests were integration/regression tests versus unit<br>tests. Integration/regression tests tend to test multiple classes, but<br>fail to fully cover the code in individual classes.<br><br>Integration/regression tests are certainly important because they test<br>



the code as it may be used in an application.  In fact, many of VTK's tests are derived from examples in the original text. Their purpose was to make sure the code actually did what the text said it would do.<br><br>


But, having 40% of VTK's code untested is alarming.<br>
<br>Last year, I picked valgrind defects as my Fall Project:<br><a href="http://itk.org/Wiki/VTK/SoftwareQuality/Valgrind/Fall2011" target="_blank">http://itk.org/Wiki/VTK/SoftwareQuality/Valgrind/Fall2011</a><br><br>I have adapted some ITK scripts to easily evaluate code coverage for VTK.<br>



There is a script in<br>Utilities/Maintenance/computeCodeCoverageLocallyForOneTest.sh that<br>facilitates generating code coverage for a set of unit tests.<br><br><br>For example, running this command from your build directory<br>


(instrumented for coverage)<br><br>../VTK/Utilities/Maintenance/computeCodeCoverageLocallyForOneTest.sh Domains/Chemistry -R vtkDomainsChemistry<br>shows that the Domains/Chemistry module has 67.6% code coverage<br>
while<br>../VTK/Utilities/Maintenance/computeCodeCoverageLocallyForOneTest.sh Geovis/Core -R vtkGeovisCore<br>shows that the Geovis/Core modules has 11.2% code coverage/<br><br>This year's Fall Project is code coverage. This is a bit ironic,<br>



because for my GE Six Sigma Project in 1995, I chose code<br>coverage.<br><br>What can you do to help?<br>If you are adding or modifying new classes to vtk, please try to<br>add/enhance the tests for your class.<br>I'll be adding gerrit topics for tests this fall. Please help me push them through the review process<br>



<br><br>
<br>Also, I'll be rejecting gerrit topics that add new classes without good<br>unit tests.<br><br>Bill<br>'<span><font color="#888888"><br><br><br clear="all"><br>-- <br>Unpaid intern in BillsBasement at noware dot com<br>

<br>
</font></span><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 <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></blockquote></div><br></div>
</div>