1

I am trying to write unit tests for hibernate DAOs, if I create test-applicationContext with postgres dialect, then do I need to install postgres to run the tests? Is there any better way to do this without having to install DB just to run the test cases? Thanks

1
  • right now my test-applicationContext is using a tempDB/table in my postgres database for running the unit test, but how do I make it inmemory without the need to install postgres? Commented Jan 9, 2013 at 15:43

1 Answer 1

3

You can use the H2 database that can also run as a in-memory database. Check this blog for a quick example.

Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.