aspose file tools*
The moose likes Testing and the fly likes Database testing best practices/tools Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Engineering » Testing
Bookmark "Database testing best practices/tools" Watch "Database testing best practices/tools" New topic
Author

Database testing best practices/tools

Gaurav Kr. Arora
Ranch Hand

Joined: Feb 20, 2011
Posts: 37
Hi,

I have below requirement and newbie in db testing:

Get a schema from DB. Get a table from schema and find out if a column name say A of that table matches with any other column in any other table in the schema.
If it matches, then find out the column data type and verify if it is same as that of column A.

For e.g, if there are 10 tables and in table 1 there is a column Dept. whose data type is varchar2(50). Now I want to search "Dept." column in all the tables, and if I find this column, I need to get its data type and verify if it matches with varchar2(50).

This is a small case with 10 tables.

Hope I have put my requirement clearly.

I can do it manually but want to automate the scenario. Will any tool/api help in such kind of scenarios?

Please let me know how I can go about testing such kind of scenarios. Any help/suggestions in this regard will be highly appreciated.

Thanks!
enric jaen
Greenhorn

Joined: Oct 15, 2010
Posts: 25
I would try one of these apis:

http://www.dbunit.org/apidocs/org/dbunit/dataset/ITableMetaData.html

http://docs.oracle.com/javase/1.4.2/docs/api/java/sql/DatabaseMetaData.html

 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Database testing best practices/tools