Software Alternatives & Reviews

How to mock a database connection in Java?

Hibernate H2 Database Engine
  1. Hibernate an open source Java persistence framework project.
    Pricing:
    • Open Source
    There are in-memory databases such as H2 which you can use for testing that is just a library you import. However, syntax can vary between databases. So it's only really appropriate if you're also using something like Hibernate which abstracts away a lot of the differences.

    #Web Frameworks #Developer Tools #Development 14 social mentions

  2. H2 is a relational database management system written in Java.
    There are in-memory databases such as H2 which you can use for testing that is just a library you import. However, syntax can vary between databases. So it's only really appropriate if you're also using something like Hibernate which abstracts away a lot of the differences.

    #Databases #NoSQL Databases #Relational Databases 2 social mentions

Discuss: How to mock a database connection in Java?

Log in or Post with