Mohan Narayanaswamy
Mohan Narayanaswamy

Reputation: 2149

Suggest a JPA Unit test framework

How to unit test JPA code? is there any way to generate Unit Test case itself?

Note: I am lazy and new to Unit Test code.

Upvotes: 7

Views: 14453

Answers (3)

Tomasz Krzyżak
Tomasz Krzyżak

Reputation: 19

recently I faced a problem of testing:

  1. business logic operating on JPA Entities
  2. complex JPQL queries mixed with business logic.

I used JPA-Unit and it solved all my problems.

Upvotes: 1

Kimble
Kimble

Reputation: 7574

I'm in the middle of trying out OpenEJB (http://openejb.apache.org/) for my ongoing project. It's an embeddable container with support for EJB 3.0 (and partially 3.1). My first impression of it is fairly good.

Upvotes: 1

Adeel Ansari
Adeel Ansari

Reputation: 39907

Check this out, Unitils. Here is a related discussion, with some example codes.

Here is the example, showing DBUnit, Spring and OpenJPA together. You might not using all, but this can take you somewhere if you want to go with DBUnit, I believe.

Upvotes: 6

Related Questions