-->
These old forums are deprecated now and set to read-only. We are waiting for you on our new forums!
More modern, Discourse-based and with GitHub/Google/Twitter authentication built-in.

All times are UTC - 5 hours [ DST ]



Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 2 posts ] 
Author Message
 Post subject: Testing Hibernate-based application
PostPosted: Wed Nov 15, 2006 10:53 pm 
Newbie

Joined: Fri Jul 28, 2006 10:53 am
Posts: 15
Here's what I imagine would be the ideal way to test my application:

1. Create two flat-file databases with all the tables and rows the testcases need, one with the initial values and one with what the database should look like after the tests are run (one-time event)
2. In the test harness, load the flat-file database
3. Call the test cases, modifying Hibernate objects like normal
4. Compare the initial and resultant databases, asserting if they don't match

Is this possible? It would seem DbUnit allows flat-file database creation and comparison, but I have no idea how to integrate DbUnit into my Hibernate web application (more specifically, how to make Hibernate use the DbUnit database; all the examples I've seen use straight JDBC and don't interface with Hibernate at all).


Top
 Profile  
 
 Post subject:
PostPosted: Thu Nov 16, 2006 5:09 am 
Hibernate Team
Hibernate Team

Joined: Mon Aug 25, 2003 9:11 pm
Posts: 4592
Location: Switzerland
Java Persistence with Hibernate has DBUnit and testing examples.

_________________
JAVA PERSISTENCE WITH HIBERNATE
http://jpwh.org
Get the book, training, and consulting for your Hibernate team.


Top
 Profile  
 
Display posts from previous:  Sort by  
Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 2 posts ] 

All times are UTC - 5 hours [ DST ]


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum

Search for:
© Copyright 2014, Red Hat Inc. All rights reserved. JBoss and Hibernate are registered trademarks and servicemarks of Red Hat, Inc.