Running the JPA Junit tests
The JPA test suite is written using JUnit. It consists of a set of jars that contain various persistence units and a number of tests. The JPA tests are contained in the eclipselink.jpa.core.test project
- Ensure you have an eclipselink jar available on your classpath. This jar is checked in to the foundation component in the SVN repository and can be created by running the ant build located in the eclipselink.core project.
- Run the build.xml in base directory of eclipselink.jpa.core.test. This will create a set of jar files containing the persistence units.
- Create a JUnit run target
- The project will be: eclipselink.jpa.core.test
- The test class will be: org.eclipse.persistence.testing.tests.jpa.FullRegressionTestSuite
- Add the JVM argument "-javaagent:<eclipselink-jar-location>/eclipselink.jar - This will allow the test models to run with weaving enabled
- Add to your classpath the following:
- Your JDBC driver
- A library that includes all the jar files generated by the build.xml in eclipsselink.jpa.core.test you ran earlier
- Copy the test.properties file from eclipselink.jpa.core.test/resource to the base directory of eclipselink.jpa.core.test and edit it to include information necessary to connect to your database
- Run the run target you created