Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
HomeAnnouncementsWhite Papers
Discussion GroupsFirst AidDatabasesJavaBeansGUIJava 3DVirtual MachineCORBASecurityToolsGeneral
Java DirectoryOpen Source ProjectsSample Book ChaptersUser GroupsWeb Resources
Related Topics
Databases.NETMore Topics ...

Java Forum / Databases / March 2005

Tip: Looking for answers? Try searching our database.

Automating testing of database queries?

Thread view: 
Rhino - 11 Mar 2005 00:26 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 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


Free Magazines

Get these publications absolutely FREE for up to 12 months. There are no hidden fees and no obligation. Simply choose a title, complete the application form and submit it. Read more ...

Oracle MagazineNetwork ComputingComputer WorldBio-IT WorldeWeekInformation WeekInfosecurity
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.