The working directory is searched for files with an extension '.db'. If there is only one such file, it is used as the sqlite3 database for all tests. Multiple .db files currently issues an error message; a possible extension is to use different db files for each test, e.g. in sorted order.
For each test, an sqlite3 command script of the form
.mode column
.headers on
<code in extra>
<student answer>
<testcode>
is run.
A fresh copy of the db file is used for each test case.
]]>id name city grade salesperson_id ---------- ---------- ---------- ---------- -------------- 3001 Brad Guzan London 100 5005 3002 Nick Riman New York 100 5001 3003 Jozy Altid Moscow 200 5007 3004 Fabian Joh Paris 300 5006 3005 Graham Zus California 200 5002
order_num amount text customer_id saleperson_id ---------- ---------- ---------- ----------- ------------- 70001 150.5 2012-10-05 3005 5002 70002 65.26 2012-10-05 3002 5001 70003 2480.4 2012-10-10 3009 5003 70004 110.5 2012-08-17 3009 5003 70005 2400.6 2012-07-27 3007 5001]]>
id name city grade salesperson_id ---------- ---------- ---------- ---------- -------------- 3001 Brad Guzan London 100 5005 3002 Nick Riman New York 100 5001 3003 Jozy Altid Moscow 200 5007 3004 Fabian Joh Paris 300 5006 3005 Graham Zus California 200 5002]]>