Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations biv343 on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

using XML files to perform unit tests

Status
Not open for further replies.

jmstring

Programmer
Oct 12, 2004
4
US
Does anyone here have experience using Dbunit ( to unit test Java classes involving database access? You use it to first export part or all of your database schema to an XML file. then before each unit test is run the database is blown away and recreated from the XML file so every test is performed against the exact same database. My question is, does anyone know of a similar framework or even an extension to Dbunit that allows the unit tests to be run against the XML file itself?
 
I'm not sure I'd see the value in that -- the purpose of Dbunit is to test your data access objects -- to make sure the values get into the database like they should. If you should (somehow) point your DAO code at an XML file instead of the real database, your tests wouldn't necessarily be valid anymore.

Chip H.


____________________________________________________________________
If you want to get the best response to a question, please read FAQ222-2244 first
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top