685 reputation
1710
bio website
location
age
visits member for 3 years, 8 months
seen Mar 26 at 17:59

Jul
22
accepted What are some best practices for populating and using a test database?
Jul
22
comment What are some best practices for populating and using a test database?
Okay, took a look at DBUnit. It seems like the tool is most geared towards doing an export from your actual DB to XML, and then consuming the XML with DBUnit. Does that sound right? Because otherwise, you'd be stuck updating your XML every time you update your database schema, which would be a major pain.
Jul
21
comment What are some best practices for populating and using a test database?
Also, is it necessary to use DI for this? Right now I have a persistance.xml in my /main/resources/META-INF folder that specifies my acutal DB server, and a persistance.xml in my /test/resources/META-INF folder that specifies H2. This seems to work really well. In general, I'm super-ultra-100% confused about Spring -- I've never used it before and don't understand how it could help me here, even though everyone says I should use it.
Jul
21
comment What are some best practices for populating and using a test database?
Awesome! Okay, I'm going to check this out.
Jul
21
comment What are some best practices for populating and using a test database?
Well, I should mention that I'm new to Hibernate. So it actually is important for me to test that I've done all my hibernate stuff correctly. Also, it seems like a lot of operations couldn't be tested with a mocking framework. For example, you have a method that returns a bunch of records. How can you test that method actually returns a bunch of records if you don't have a database for it to run against?
Jul
21
comment What are some best practices for populating and using a test database?
Cool -- I'll definitely check that out. Right now, I'm telling Hibernate to auto-create the tables, using the hibernate.hbm2ddl.auto=create-drop property. Will that work with DBUnit, or should I stop doing this?
Jul
21
comment What are some best practices for populating and using a test database?
Yes, I already use Mockito for unit tests. But I also want to do (integration?) tests that reach out to the DB.
Jul
21
revised What are some best practices for populating and using a test database?
edited title
Jul
21
asked What are some best practices for populating and using a test database?
Jul
21
accepted What does the Spring framework do? Should I use it? Why or why not?
Jul
14
awarded  Nice Question
Jul
12
awarded  Editor
Jul
12
revised What does the Spring framework do? Should I use it? Why or why not?
added 97 characters in body
Jul
12
asked What does the Spring framework do? Should I use it? Why or why not?
May
18
awarded  Scholar
May
18
awarded  Supporter
May
18
accepted Is it necessary to write a javadoc comment for EVERY parameter in a method's signature?
May
11
awarded  Student
May
11
asked Is it necessary to write a javadoc comment for EVERY parameter in a method's signature?