<html>
<head>
<meta http-equiv="content-type" content="text/html; charset=ISO-8859-1">
</head>
<body text="#000000" bgcolor="#FFFFFF">
<meta http-equiv="Content-Type" content="text/html;
charset=ISO-8859-1">
<p style="margin:0in;font-family:Calibri;font-size:11.0pt">Hi list,<br>
</p>
<p style="margin:0in;font-family:Calibri;font-size:11.0pt"><br>
With almost 20 years
of development, the MapServer codebase can be overwhelming at
first. For most
open source projects I've found the easiest way into helping with
a project is:</p>
<p style="margin:0in;font-family:Calibri;font-size:11.0pt"> </p>
<ol style="margin-left:.375in;direction:ltr;unicode-bidi:embed;
margin-top:0in;margin-bottom:0in;font-family:Calibri;font-size:11.0pt;
font-weight:normal;font-style:normal" type="1">
<li value="1"
style="margin-top:0;margin-bottom:0;vertical-align:middle"><span
style="font-family:Calibri;font-size:11.0pt;font-weight:normal;font-style:
normal;font-family:Calibri;font-size:11.0pt">Reporting bugs</span></li>
<li style="margin-top:0;margin-bottom:0;vertical-align:middle"><span
style="font-family:Calibri;font-size:11.0pt">Finding the
problematic code</span></li>
<li style="margin-top:0;margin-bottom:0;vertical-align:middle"><span
style="font-family:Calibri;font-size:11.0pt">Submitting a
patch and unit test. </span></li>
</ol>
<p style="margin:0in;font-family:Calibri;font-size:11.0pt"> </p>
<p style="margin:0in;font-family:Calibri;font-size:11.0pt">In 2006
there was a
Request For Comments (#12) by Umberto Nicoletti about adding C
Unit tests: </p>
<p
style="margin:0in;font-family:Calibri;font-size:9.0pt;color:#595959"> </p>
<p style="margin:0in;font-family:Calibri;font-size:11.0pt"><a
href="http://www.mapserver.org/development/rfc/ms-rfc-12.html">http://www.mapserver.org/development/rfc/ms-rfc-12.html</a></p>
<p style="margin:0in;font-family:Calibri;font-size:11.0pt">Also see
GitHub issue #1664: <a
href="https://github.com/mapserver/mapserver/issues/1664">https://github.com/mapserver/mapserver/issues/1664</a><br>
<br>
</p>
<p style="margin:0in;font-family:Calibri;font-size:11.0pt">Obviously
a full
test suite of existing code isn't possible, however if the testing
framework
and skeleton folder/file structure was set up it may help more
concrete
contributions from developers outside of the core MapServer team.
</p>
<p style="margin:0in;font-family:Calibri;font-size:11.0pt"> </p>
<p style="margin:0in;font-family:Calibri;font-size:11.0pt">There
have been a
few bugs I've submitted where I would feel comfortable adding a
unit test to an
existing file to show the error, but creating full msautotest
examples seems
very daunting. As a concrete example while testing the latest dev
build I noticed
the msParseTime function in the maptime.c module threw an error.
Unit tests for
this function seem like the perfect solution for these types of
bugs, and to
avoid breaking changes in the future. </p>
<p style="margin:0in;font-family:Calibri;font-size:11.0pt"> </p>
<p style="margin:0in;font-family:Calibri;font-size:11.0pt"><a
href="https://github.com/mapserver/mapserver/commit/0cc47e3027a75cf18c5310694877999c6b245371">https://github.com/mapserver/mapserver/commit/0cc47e3027a75cf18c5310694877999c6b245371</a></p>
<p style="margin:0in;font-family:Calibri;font-size:11.0pt"> </p>
<p style="margin:0in;font-family:Calibri;font-size:11.0pt">C Unit
tests have
come up a few times in the past e.g. Paul Ramsey's post about
PostGIS driver
testing: <a
href="http://osgeo-org.1560.x6.nabble.com/cunit-RFC-12-td4261340.html">http://osgeo-org.1560.x6.nabble.com/cunit-RFC-12-td4261340.html</a></p>
<p style="margin:0in;font-family:Calibri;font-size:11.0pt"> </p>
<p style="margin:0in;font-family:Calibri;font-size:11.0pt">Frank
Warmerdam's
response (in 2008) was - </p>
<p style="margin:0in;font-family:Calibri;font-size:11.0pt"> </p>
<p style="margin:0in;font-family:Calibri;font-size:11.0pt"><span
style="font-style:italic">My preference remains to test specific
functions as
part of a larger </span></p>
<p style="margin:0in;font-family:Calibri;font-size:11.0pt"><span
style="font-style:italic">operations since we already have such
technology in
place (ie. msautotest) </span></p>
<p style="margin:0in;font-family:Calibri;font-size:11.0pt"><span
style="font-style:italic">or to expose the functionality through
mapscript and
use mapscript tests </span></p>
<p style="margin:0in;font-family:Calibri;font-size:11.0pt"><span
style="font-style:italic">like Sean's python unit tests. </span></p>
<p style="margin:0in;font-family:Calibri;font-size:11.0pt"> </p>
<p style="margin:0in;font-family:Calibri;font-size:11.0pt"><span
style="font-style:italic">I do not feel that introducing another
testing
methodology into the </span></p>
<p style="margin:0in;font-family:Calibri;font-size:11.0pt"><span
style="font-style:italic">project would be wise. </span></p>
<p style="margin:0in;font-family:Calibri;font-size:11.0pt"> </p>
<p style="margin:0in;font-family:Calibri;font-size:11.0pt">The
Python unit
tests are again useful, but require testing against full builds, a
difficult
task for those not familiar with make files and gathering
dependencies. </p>
<p style="margin:0in;font-family:Calibri;font-size:11.0pt"> Testing
database
drivers as I understand it would require a full test database
setup with
msautotest, whereas for many bugs it is clear which function needs
modifying
and a unit test could be added quickly to highlight and help fix
the bug. </p>
<p style="margin:0in;font-family:Calibri;font-size:11.0pt"> </p>
<p style="margin:0in;font-family:Calibri;font-size:11.0pt">I've only
experience in Python and .NET unit testing so perhaps C testing is
more trouble than it is worth. <br>
I guess it is up to
the core devs whether it has any benefit to themselves, or the
project as a
whole, whether this issue should be reconsidered. <br>
</p>
<br>
<p style="margin:0in;font-family:Calibri;font-size:11.0pt">Regards,<br>
</p>
<p style="margin:0in;font-family:Calibri;font-size:11.0pt">Seth<br>
</p>
<p style="margin:0in;font-family:Calibri;font-size:11.0pt"><br>
</p>
<div class="moz-text-html" lang="x-western"> <font color="#888888">--<br>
web:</font><a href="http://geographika.co.uk"><font
color="#888888"> </font>http://geographika.co.uk</a><br>
<font color="#888888">twitter: @geographika<br>
</font><br>
</div>
<p style="margin:0in;font-family:Calibri;font-size:11.0pt"><br>
</p>
<meta name="ProgId" content="OneNote.File">
<meta name="Generator" content="Microsoft OneNote 14">
</body>
</html>