HomeEMF HibernateEMF JDO/JPOXWeb App GenerationServices
 

EMF - JPOX Testcases

The EMF - JPOX integration is continously being tested using a number (currently > 55) of testcases. Some testcases cover specific features such as one-to-many relations. Other testcases cover specific error conditions. In addition a number of EMF tutorials and examples have been added as testcases.

Test cases are run using the following environment: Eclipse 3.1-3.2/EMF 2.1-2.2, jdk 1.4.2, JPOX 1.1.0rc1, Mysql 4.1.14 and SQL Server 2000.

Download test case projects

To run the test cases you need to download a number of related Eclipse projects. See the Subversion page for download information:

  • org.elver.store. annotations: is responsible for generating the package.jdo file
  • org.elver.store: generic part of solution
  • org.elver.store. jpox: the emf-jpox runtime
  • org.elver.store. samples: this project contains the examples and model information used in the testcases.
  • org.elver.store. commontest: this project contains the test case part which is common for Hibernate and JPOX
  • org.elver.store. jpox.test: the jpox specific part of the tests

Configuration

Before running the testcases you have to specify the database connection information in the dbadapters.properties file in the org.elver.store.jpox.test project in the src folder. The properties are explained in the dbadapters.properties file. The test.properties file in the same folder determines which configuration is tested (for example which database and which inheritance mapping strategy).

Note that the database driver specified in the dbadapters.properties file should be added to the project's class path (in project properties).

Run the jpox testcases

A complete jpox testcase run consists of two steps: 1) to generate the package.jdo and 2) to run the testcase itself. The generation of the jdo file and the actual test have to be run separately because of class loader issues.

The package.jdo's are generated through the org.elver.store.jpox.test.AllGenerateTests test run. After the generate testrun the generated package.jdo's can be found in the run directory of the org.elver.store.jpox.test project.

The testrun itself is done through the org.elver.store.jpox.test.AllTests class.