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><div>-- <br><div>Regards,</div><div>J Kishore Kumar.</div><div><br>
</div><div>[1] - <a href="http://code.google.com/p/googletest/">http://code.google.com/p/googletest/</a></div><div>[2] - <a href="https://github.com/justjkk/pgrouting/commits/python_unittests">https://github.com/justjkk/pgrouting/commits/python_unittests</a></div>
<meta http-equiv="content-type" content="text/html; charset=utf-8"><meta http-equiv="content-type" content="text/html; charset=utf-8"><br>
</div>