Hi Kishore,<div><br></div><div>That&#39;s a great idea! </div><div>I had actually made a ticket for unit tests some time ago: </div><div><meta http-equiv="content-type" content="text/html; charset=utf-8"><a href="https://github.com/pgRouting/pgrouting/issues/20">https://github.com/pgRouting/pgrouting/issues/20</a></div>

<div>So far nobody has done anything of course. Tickets only don&#39;t get anything done ;-)</div><div><br></div><div>I hope Anton or someone else can give some better answer, because I don&#39;t know well about this topic.</div>

<div>Have you looked at how PostGIS is doing it? There is some chance that pgRouting and PostGIS will merge (someday), so then it would be good to have something that fits already.</div><div><br></div><div>One important point is in my opinion to have some suitable network graph for testing. </div>

<div>Something that can cover all test cases and can eventually give some visual.</div><div><br></div><div>Daniel</div><div><br></div><div><a href="https://github.com/pgRouting/pgrouting/issues/20"></a><br><br><div class="gmail_quote">

2011/4/20 Kishore Kumar <span dir="ltr">&lt;<a href="mailto:justjkk@gmail.com">justjkk@gmail.com</a>&gt;</span><br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;">Hi,<div>

<br></div><div>I was exploring on ways to improve the pgrouting codebase and make it suited for easier development. It struck me that writing unittests for all the pgrouting functions will help with both documentation as well as reduce the overhead of manual testing. Initially I tried using google&#39;s c++ testing framework[1] to test the c and c++ functions but encountered problems because the c functions were using postgresql library and decoupling psql interactions from the core algorithm seemed too much of a rewrite for testing.</div>


<div><br></div><div>Hence, I resolved to implementing black box testing of individual SQL functions. Since this can be done independent of the language constraints, I explored opportunities with using python. I found python&#39;s unittest framework to be both light and flexible for the purpose. The initial attempts can be found in my python_unittests branch[2].</div>


<div><br></div><div>The problem I&#39;m facing is to run the tests between &#39;make&#39; and &#39;make install&#39; stages. Currently, the tests are run against the installed version of pgrouting found at $libdir so that testing can be done only after installing.</div>


<div><br></div><div>Will be glad to hear any problems with the current choice of tools or if the testing approach needs to be changed.</div><div><br></div><font color="#888888"><div>-- <br><div>Regards,</div><div>J Kishore Kumar.</div>

<div><br>
</div><div>[1] - <a href="http://code.google.com/p/googletest/" target="_blank">http://code.google.com/p/googletest/</a></div><div>[2] - <a href="https://github.com/justjkk/pgrouting/commits/python_unittests" target="_blank">https://github.com/justjkk/pgrouting/commits/python_unittests</a></div>


<br>
</div>
</font><br>_______________________________________________<br>
pgrouting-dev mailing list<br>
<a href="mailto:pgrouting-dev@lists.osgeo.org">pgrouting-dev@lists.osgeo.org</a><br>
<a href="http://lists.osgeo.org/mailman/listinfo/pgrouting-dev" target="_blank">http://lists.osgeo.org/mailman/listinfo/pgrouting-dev</a><br>
<br></blockquote></div><br><br clear="all"><br>-- <br><span style="font-family:arial, sans-serif;font-size:13px;border-collapse:collapse">Georepublic UG &amp; Georepublic Japan<br>eMail: <a href="mailto:daniel.kastl@georepublic.de" style="color:rgb(66, 99, 171)" target="_blank">daniel.kastl@georepublic.de</a><br>

Web: <a href="http://georepublic.de/" style="color:rgb(66, 99, 171)" target="_blank">http://georepublic.de</a></span><br>
</div>