<br><br><div><span class="gmail_quote">On 4/12/06, <b class="gmail_sendername">Paul Winkler</b> &lt;<a href="mailto:pw_lists@slinkp.com">pw_lists@slinkp.com</a>&gt; wrote:</span><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
<br><br>Functionally, we are missing some important testables:<br><br>* we have no way to verify that these queries are syntactically correct sql.<br><br>* we have no way to verify that these queries behave as expected against
<br>&nbsp;&nbsp;a sample data set.<br><br>How do people test this sort of thing? Do you go whole-hog and<br>fire up MySQL or whatever?&nbsp;&nbsp;Or use gadfly? sqlite? or what?<br><br>Are there other tools I should know about?</blockquote><div>
<br>
Sorry, It is taking a little more than I expected to prepare the
sample. However, I can provide some idea on this topic. We do this
using ZopeTestCase.<br>
<br>
Basically, we have a test database (postgresql, but it can be used for
whatever transactional database). Each user has its own database, based
on its username.<br>
<br>
The test does actual queries on the test database. At the end of each
test (single test, not test suite), there is a rollback (if you're
using a Z Database Adapter, this is done automatically by the
transaction machinery).<br>
<br>
So, each single test runs with a &quot;fresh&quot; copy of the database.<br>
<br>
Regards<br>
Marco<br>
&nbsp;</div></div><br clear="all"><br>-- <br>Icube Srl<br><a href="http://www.icube.it/">http://www.icube.it/</a><br>