-->
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.  [ 3 posts ] 
Author Message
 Post subject: how to test DAOs?
PostPosted: Thu Sep 01, 2005 8:11 am 
Beginner
Beginner

Joined: Thu Apr 29, 2004 4:03 pm
Posts: 40
Hi,

maybe a little bit offtopic, but maybe you have some tips:
how to testDAOs? After migration to hibernate 3, I found out, that some HQLs are not working anymore.
The best will be to run integration test against all DAO classes: something , like generate parameters for DAO method, than invoke the method, and see whether some exception raises.

this could be a highly automated task, do you know any helper-framework, which can do this kind of testing?

any ideas welcome


Top
 Profile  
 
 Post subject:
PostPosted: Thu Sep 01, 2005 8:31 am 
Senior
Senior

Joined: Thu Aug 04, 2005 4:54 am
Posts: 153
Location: Birmingham, UK
JUnit is probably what you're looking for.


Top
 Profile  
 
 Post subject:
PostPosted: Thu Sep 01, 2005 8:41 am 
Beginner
Beginner

Joined: Thu Apr 29, 2004 4:03 pm
Posts: 40
jamie_dainton wrote:
JUnit is probably what you're looking for.


thanx for answer, but I know junit, and it does not apply for this case.

I need some mechanism to AUTOMATICALLY test a larg number of DAOs (200) in our application. I mean all I want is just to invoke every method on the specified DAO with randomly generated input parameters, just to see, if the HQL or JDBC query is OK (and no exceptions will be thrown).
I could write some reflection-messy code, but maybe you have better ideas.


Top
 Profile  
 
Display posts from previous:  Sort by  
Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 3 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.