I haven't been involved in testing of database queries in quite some time
and I feel sure there have been many developments and improvements in the
intervening years. Can anyone tell me what today's "preferred" tools are for
database testing?
I'm mostly interested in SELECTs at the moment but I'm curious about tools
to test other types of SQL as well.
To be more specific, if my query is supposed to produce a result set that
contains a specific number of rows with specific values in each column of
each row, what is the best way to verify that my result set matches
expectations precisely?
Clearly, I can't just count the number of rows in the expected result and
compare them to the number I actually got; that will not detect whether I
got the *correct* rows. And I can't just look at keys because I need to
verify that values in non-key columns are also correct. Eyeballing large
results - where large is anything over a handful of rows and columns - is
tedious and error prone at best.
The only reasonable approach I know about - from years gone by - is to
unload the result table into a flat file and compare it to a flat-file
version of the expected result to see if they match. But how do you create
the flat-file version of the expected result quickly and efficiently?
I've got to believe that there are some slick modern tools that make all
this a breeze. Can anyone enlighten me on what they might be?

Signature
Rhino
---
rhino1 AT sympatico DOT ca
"There are two ways of constructing a software design. One way is to make it
so simple that there are obviously no deficiencies. And the other way is to
make it so complicated that there are no obvious deficiencies." - C.A.R.
Hoare
Virgil Green - 22 Mar 2005 20:19 GMT
> I haven't been involved in testing of database queries in quite some
> time and I feel sure there have been many developments and
[quoted text clipped - 24 lines]
> I've got to believe that there are some slick modern tools that make
> all this a breeze. Can anyone enlighten me on what they might be?
Nope. Someone has to generate the test case data and has to verify it.
Otherwise you're just using *another* program that must be tested/verified.
--
Virgil