Re: How to make self contained database dependant unit tests in maven 2?
Take a look at some of the in memory Java databases. We use Hibernate with Hypersonic in test, and then switch to MSSQLServer in production very successfully. Eric On Nov 9, 2005, at 5:21 PM, Brian E. Fox wrote: We currently have a system that uses JDO (Kodo implementation) for our persistence layer. In order to test these persistent classes, I need to have a JDBC driver and compliant database running. I would really like to make the process completely self contained like the Maven Wagon builds. ie download a jar from somewhere that gives me an ultra light db implementation and jdbc driver and run my tests on it. Does anyone know if such a thing exists and where I might find it? Alternatively, does anyone know of any decent file based jdbc drivers that are open source? Thanks. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: How to make self contained database dependant unit tests in maven 2?
I use HSQL DB (http://hsqldb.org/) for testing with both Kodo JDO and Hibernate. It works well and is very fast. This is what I have in my pom.xml dependency groupIdhsqldb/groupId artifactIdhsqldb/artifactId version1.7.2.2 http://1.7.2.2/version scopetest/scope /dependency Chris -- Enterprise POJO consulting - http://www.chrisrichardson.net Author, POJOs in Action - http://www.manning.com/crichardson Enterprise POJOs blog - http://chris-richardson.blog-city.com On 11/9/05, Brian E. Fox [EMAIL PROTECTED] wrote: We currently have a system that uses JDO (Kodo implementation) for our persistence layer. In order to test these persistent classes, I need to have a JDBC driver and compliant database running. I would really like to make the process completely self contained like the Maven Wagon builds. ie download a jar from somewhere that gives me an ultra light db implementation and jdbc driver and run my tests on it. Does anyone know if such a thing exists and where I might find it? Alternatively, does anyone know of any decent file based jdbc drivers that are open source? Thanks.
RE: How to make self contained database dependant unit tests in maven 2?
Funny you should mention that. I just stumbled upon this myself. Do you need to execute anything before hand to setup the hsqldb or do you just point the jdbc connection at it? -Original Message- From: Chris Richardson [mailto:[EMAIL PROTECTED] Sent: Wednesday, November 09, 2005 2:06 PM To: Maven Users List Subject: Re: How to make self contained database dependant unit tests in maven 2? I use HSQL DB (http://hsqldb.org/) for testing with both Kodo JDO and Hibernate. It works well and is very fast. This is what I have in my pom.xml dependency groupIdhsqldb/groupId artifactIdhsqldb/artifactId version1.7.2.2 http://1.7.2.2/version scopetest/scope /dependency Chris -- Enterprise POJO consulting - http://www.chrisrichardson.net Author, POJOs in Action - http://www.manning.com/crichardson Enterprise POJOs blog - http://chris-richardson.blog-city.com On 11/9/05, Brian E. Fox [EMAIL PROTECTED] wrote: We currently have a system that uses JDO (Kodo implementation) for our persistence layer. In order to test these persistent classes, I need to have a JDBC driver and compliant database running. I would really like to make the process completely self contained like the Maven Wagon builds. ie download a jar from somewhere that gives me an ultra light db implementation and jdbc driver and run my tests on it. Does anyone know if such a thing exists and where I might find it? Alternatively, does anyone know of any decent file based jdbc drivers that are open source? Thanks. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: How to make self contained database dependant unit tests in maven 2?
Testing with another DB than the production one has its disadvantages too. There is a nice discussion about it here: http://www.theserverside.com/tss?service=direct/0/NewsThread/threadViewer.markNoisy.linksp=l33215sp=l165443 2005/11/9, Brian E. Fox [EMAIL PROTECTED]: Funny you should mention that. I just stumbled upon this myself. Do you need to execute anything before hand to setup the hsqldb or do you just point the jdbc connection at it? -Original Message- From: Chris Richardson [mailto:[EMAIL PROTECTED] Sent: Wednesday, November 09, 2005 2:06 PM To: Maven Users List Subject: Re: How to make self contained database dependant unit tests in maven 2? I use HSQL DB (http://hsqldb.org/) for testing with both Kodo JDO and Hibernate. It works well and is very fast. This is what I have in my pom.xml dependency groupIdhsqldb/groupId artifactIdhsqldb/artifactId version1.7.2.2 http://1.7.2.2/version scopetest/scope /dependency Chris -- Enterprise POJO consulting - http://www.chrisrichardson.net Author, POJOs in Action - http://www.manning.com/crichardson Enterprise POJOs blog - http://chris-richardson.blog-city.com On 11/9/05, Brian E. Fox [EMAIL PROTECTED] wrote: We currently have a system that uses JDO (Kodo implementation) for our persistence layer. In order to test these persistent classes, I need to have a JDBC driver and compliant database running. I would really like to make the process completely self contained like the Maven Wagon builds. ie download a jar from somewhere that gives me an ultra light db implementation and jdbc driver and run my tests on it. Does anyone know if such a thing exists and where I might find it? Alternatively, does anyone know of any decent file based jdbc drivers that are open source? Thanks. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: How to make self contained database dependant unit tests in maven 2?
Agreed. The intent for my team is to be able to build and run automatic tests even if a db isn't installed. (or if it is, but maybe we don't want to wipe the data everybuild) When we build for a test environment, we would use a production db. -Original Message- From: Eduardo Rocha [mailto:[EMAIL PROTECTED] Sent: Wednesday, November 09, 2005 2:27 PM To: Maven Users List Subject: Re: How to make self contained database dependant unit tests in maven 2? Testing with another DB than the production one has its disadvantages too. There is a nice discussion about it here: http://www.theserverside.com/tss?service=direct/0/NewsThread/threadViewe r.markNoisy.linksp=l33215sp=l165443 2005/11/9, Brian E. Fox [EMAIL PROTECTED]: Funny you should mention that. I just stumbled upon this myself. Do you need to execute anything before hand to setup the hsqldb or do you just point the jdbc connection at it? -Original Message- From: Chris Richardson [mailto:[EMAIL PROTECTED] Sent: Wednesday, November 09, 2005 2:06 PM To: Maven Users List Subject: Re: How to make self contained database dependant unit tests in maven 2? I use HSQL DB (http://hsqldb.org/) for testing with both Kodo JDO and Hibernate. It works well and is very fast. This is what I have in my pom.xml dependency groupIdhsqldb/groupId artifactIdhsqldb/artifactId version1.7.2.2 http://1.7.2.2/version scopetest/scope /dependency Chris -- Enterprise POJO consulting - http://www.chrisrichardson.net Author, POJOs in Action - http://www.manning.com/crichardson Enterprise POJOs blog - http://chris-richardson.blog-city.com On 11/9/05, Brian E. Fox [EMAIL PROTECTED] wrote: We currently have a system that uses JDO (Kodo implementation) for our persistence layer. In order to test these persistent classes, I need to have a JDBC driver and compliant database running. I would really like to make the process completely self contained like the Maven Wagon builds. ie download a jar from somewhere that gives me an ultra light db implementation and jdbc driver and run my tests on it. Does anyone know if such a thing exists and where I might find it? Alternatively, does anyone know of any decent file based jdbc drivers that are open source? Thanks. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: How to make self contained database dependant unit tests in maven 2?
On 11/9/05, Brian E. Fox [EMAIL PROTECTED] wrote: Funny you should mention that. I just stumbled upon this myself. Do you need to execute anything before hand to setup the hsqldb or do you just point the jdbc connection at it? You configure Hibernate/Kodo JDO to create the schema on startup and point the DataSource at hsqldb. Use the org.hsqldb.jdbcDriver with this URL: jdbc:hsqldb:mem:testdb - this connects to an in-memory database. Chris -- Enterprise POJO consulting - http://www.chrisrichardson.net Author, POJOs in Action - http://www.manning.com/crichardson Enterprise POJOs blog - http://chris-richardson.blog-city.com -Original Message- From: Chris Richardson [mailto:[EMAIL PROTECTED] Sent: Wednesday, November 09, 2005 2:06 PM To: Maven Users List Subject: Re: How to make self contained database dependant unit tests in maven 2? I use HSQL DB (http://hsqldb.org/) for testing with both Kodo JDO and Hibernate. It works well and is very fast. This is what I have in my pom.xml dependency groupIdhsqldb/groupId artifactIdhsqldb/artifactId version1.7.2.2 http://1.7.2.2 http://1.7.2.2/version scopetest/scope /dependency Chris -- Enterprise POJO consulting - http://www.chrisrichardson.net Author, POJOs in Action - http://www.manning.com/crichardson Enterprise POJOs blog - http://chris-richardson.blog-city.com On 11/9/05, Brian E. Fox [EMAIL PROTECTED] wrote: We currently have a system that uses JDO (Kodo implementation) for our persistence layer. In order to test these persistent classes, I need to have a JDBC driver and compliant database running. I would really like to make the process completely self contained like the Maven Wagon builds. ie download a jar from somewhere that gives me an ultra light db implementation and jdbc driver and run my tests on it. Does anyone know if such a thing exists and where I might find it? Alternatively, does anyone know of any decent file based jdbc drivers that are open source? Thanks. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: How to make self contained database dependant unit tests in maven 2?
Chris Richardson wrote: On 11/9/05, Brian E. Fox [EMAIL PROTECTED] wrote: Funny you should mention that. I just stumbled upon this myself. Do you need to execute anything before hand to setup the hsqldb or do you just point the jdbc connection at it? You configure Hibernate/Kodo JDO to create the schema on startup and point the DataSource at hsqldb. Use the org.hsqldb.jdbcDriver with this URL: jdbc:hsqldb:mem:testdb - this connects to an in-memory database. A related but list-off-topic question, would you know how to create the schema as part of the test if one is not using Hibernate/Kodo JDO, if one just has the DDL as a SQL script? michael - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: How to make self contained database dependant unit tests in maven 2?
You would probably have to create the full schema. Fortunately with Kodo, it can create the classes as needed so we have a little control. -Original Message- From: Michael Heuer [mailto:[EMAIL PROTECTED] On Behalf Of Michael Heuer Sent: Wednesday, November 09, 2005 4:47 PM To: Maven Users List Subject: Re: How to make self contained database dependant unit tests in maven 2? Chris Richardson wrote: On 11/9/05, Brian E. Fox [EMAIL PROTECTED] wrote: Funny you should mention that. I just stumbled upon this myself. Do you need to execute anything before hand to setup the hsqldb or do you just point the jdbc connection at it? You configure Hibernate/Kodo JDO to create the schema on startup and point the DataSource at hsqldb. Use the org.hsqldb.jdbcDriver with this URL: jdbc:hsqldb:mem:testdb - this connects to an in-memory database. A related but list-off-topic question, would you know how to create the schema as part of the test if one is not using Hibernate/Kodo JDO, if one just has the DDL as a SQL script? michael - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]