On Wed, Jan 21, 2004 at 08:29:42PM -0500, Thomas A. Lowery wrote:
> On Sun, Jan 18, 2004 at 11:27:32AM +0000, Tim Bunce wrote:
> > On Sat, Jan 17, 2004 at 04:51:36PM +0100, H.Merijn Brand wrote:
> > > On Sat 17 Jan 2004 15:16, Tim Bunce <[EMAIL PROTECTED]> wrote:
> > > > On Fri, Jan 16, 2004 at 07:48:15PM -0500, Thomas A. Lowery wrote:
> > > > > > Any volunteers to work on this?
> > > > >
> > > > > I will.
> > > >
> > > > Wonderful! Many thanks Tom.
> > >
> > > Yes. Great.
> > >
> > > Send the prototype to me [...]
> >
> > Before we get that far there should be some discussion on the design first.
>
> Shall I start a new thread for the design discussion?
Yes. That would be good.
Perhaps start with an outline of the goals and requirements we can
discuss and (hopefully) agree on.
Some things to consider:
The majority of tests should not require write access to the database.
Those that do should try to use temporary tables where possible.
The DBI::Test::<dbtype> classes should do as little as possible,
typically just provide an sql statement that'll return certain
expected results. Specifically they should not be responsible for
determining if a test passed or failed. They're there just to
hide database specifics in setting up each group of tests.
Many many sth tests can just use "select 'foo' as bar" (or equiv).
That particular sql could be returned by a method call like this:
$sql = $dbh->test_sql_select_1col1row_foo_varchar_as_bar;
Metadata methods like $dbh->get_info will be the primary way the
tests know what to expect of a driver. Driver authors will be
excepted to implement get_info (etc) in enough detail for the
tests to function. [Though as the test harness uses a dbi subclass
the DBI::Test::<dbtype> classes can provide hardwired defaults,
and a warning, if $dbh->SUPER::get_info(...) returns undef]
Data-type specific tests will be driven by $dbh->type_info_all()
For each type a temp table should be created. A value inserted,
commited, selected and checked, including $sth->{TYPE} etc.
use Test::More
(Don't reply to this, merge in your own thoughts, and any from others
who might send them to you, and we'll start over with your summary.)
Tim.