Best practices in testing Hibernate/EJB3 POJOs (or doing database tests)

2006-07-11 Thread Jose Gonzalez Gomez
Hi there, I would like to hear about what you're doing to test your Hibernate/EJB3 POJOs (if you're doing at all). I have a project with some of them, and I have the following concerns: First of all, I may test them just ignoring persistence (already done). No problem here, just a bunch of

RE: Best practices in testing Hibernate/EJB3 POJOs (or doing database tests)

2006-07-11 Thread Andrew-A . Davies
Have you thought about using dependency injection framework to cater for this ? A -Original Message- From: Jose Gonzalez Gomez [mailto:[EMAIL PROTECTED] Sent: 11 July 2006 12:53 To: Maven Users List Subject: Best practices in testing Hibernate/EJB3 POJOs (or doing database tests) Hi

RE: Best practices in testing Hibernate/EJB3 POJOs (or doing database tests)

2006-07-11 Thread Johann Reyes
practices in testing Hibernate/EJB3 POJOs (or doing database tests) Hi there, I would like to hear about what you're doing to test your Hibernate/EJB3 POJOs (if you're doing at all). I have a project with some of them, and I have the following concerns: First of all, I may test them just ignoring

Re: Best practices in testing Hibernate/EJB3 POJOs (or doing database tests)

2006-07-11 Thread Alexandre Touret
Hello Jose Gonzalez Gomez wrote: Problem 1: Whenver building the project, publishing the site, etc. you must have access to a runnning database in order to perform the tests. I'm currently running a postgresql database, but it may be cumbersome for users wanting to download and hack the

Re: Best practices in testing Hibernate/EJB3 POJOs (or doing database tests)

2006-07-11 Thread Simone Gianni
Hi Jose, we usually use hypersonic DB, which is a very lightweight, embeddable DB, able to run in ram only mode. You can simply set it up in the test setup method and shut it down in the teardown. http://www.hsqldb.org/ Hope this helps, Simone Jose Gonzalez Gomez wrote: Hi there, I would

Re: Best practices in testing Hibernate/EJB3 POJOs (or doing database tests)

2006-07-11 Thread Chris Richardson
Jose, Here are a couple of things you might find interesting: * A excerpt from my book POJOs in Action on testing a persistence layer: http://www.theserverside.com/tt/articles/article.tss?l=PersistentDomain * The slide from my JavaOne talk on the same topic: