Re: hsql DB startup

2005-01-06 Thread Jake Ewerdt
On Thursday 06 January 2005 02:28 am, Janos Mucsi wrote: This is not a strictly Maven question. Hi Jake This sounds very interesting. I have two questions: 1. Is testing against an in-process database a better idea than using mock-objects to fake Connection, ResultSet, etc? (I need to test

Re: hsql DB startup

2005-01-06 Thread Laurent Petit
Jake Ewerdt wrote: On Thursday 06 January 2005 02:28 am, Janos Mucsi wrote: This is not a strictly Maven question. Hi Jake This sounds very interesting. I have two questions: 1. Is testing against an in-process database a better idea than using mock-objects to fake Connection, ResultSet, etc?

hsql DB startup

2005-01-05 Thread Charles N. Harvey III
Hello. I have been doing lots of reading about how great it is to use an in-process DB like Hypersonic for testing. Thing is, there are not many examples of how to do this. What I want to do is start an in-memory DB (not a file DB because the test is small) when I run my tests, and then run

Re: hsql DB startup

2005-01-05 Thread Joe Germuska
At 11:35 AM -0500 1/5/05, Charles N. Harvey III wrote: Hello. I have been doing lots of reading about how great it is to use an in-process DB like Hypersonic for testing. Thing is, there are not many examples of how to do this. What I want to do is start an in-memory DB (not a file DB because

Re: hsql DB startup

2005-01-05 Thread Jake Ewerdt
I set up the HSQL database in the JUnit TestSetup. This drops and re-creates the database for each test class that need the database, but the overhead is quite low, only a few test classes need the database running, and it ensures left over database artifacts will not have any side-effects on

Re: hsql DB startup

2005-01-05 Thread Charles N. Harvey III
This is exactly what I was looking for. I'm still playing with it to get it to work out correctly, but it is in the right direction, thanks. If I write a TestSuite (AllTests.java), will it run first? That's one thing that I was never sure of. Do the tests all run individually or does the Suite

Re: hsql DB startup

2005-01-05 Thread Jake Ewerdt
This all has to do with JUnit, nothing maven specific. If you want to write a TestSuite that runs all of the tests you specify, you can use a solution like http://junit.sourceforge.net/doc/faq/faq.htm#organize_3. I'm almost positive that maven will not pick up a test class unless the name of

hsql DB startup

2005-01-05 Thread Janos Mucsi
But this means your live system also has to run using HSQL otherwise this test does not make sense right? (Because of the differences in the SQL dialects, for example.) I set up the HSQL database in the JUnit TestSetup. This drops and re-creates the database for each test class that need the

Re: hsql DB startup

2005-01-05 Thread Jake Ewerdt
This is why and how we use HSQL for testing. - It is much faster for developers who are in the habit of continuous testing to use HSQL instead of (for example) Oracle. - We don't have enough Oracle resources (connections, accounts, cpu) to support all the developers using it for continuous

hsql DB startup

2005-01-05 Thread Janos Mucsi
This is not a strictly Maven question. Hi Jake This sounds very interesting. I have two questions: 1. Is testing against an in-process database a better idea than using mock-objects to fake Connection, ResultSet, etc? (I need to test some hand-coded JDBC DAOs which I will redevelop later with