| bio | website | |
|---|---|---|
| location | ||
| age | ||
| visits | member for | 2 years |
| seen | Mar 28 '12 at 20:57 | |
| stats | profile views | 21 |
|
Apr 29 |
awarded | Yearling |
|
Dec 26 |
awarded | Famous Question |
|
Oct 14 |
awarded | Popular Question |
|
Jun 15 |
awarded | Good Question |
|
Jun 11 |
awarded | Notable Question |
|
Apr 29 |
awarded | Yearling |
|
Feb 3 |
awarded | Popular Question |
|
Jul 22 |
comment |
What are some best practices for populating and using a test database? Okay, thanks! I'm going to continue looking into this. Any other tips for using DBUnit? |
|
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 |
asked | Should I use a framework for my new REST-based Java webapp? If so, which one? |
|
Jul 21 |
accepted | What does the Spring framework do? Should I use it? Why or why not? |
|
Jul 14 |
awarded | Nice Question |