Development
Documentation
Testing
Testing DataNucleus with Maven2

DataNucleus can be easily developed using Maven2. Please refer to Building with Maven2 for details of building the plugins.

DataNucleus testing is split into several Maven2 projects, two of which are prerequisites for testing. As follows :-

test.framework

The "test.framework" project (in SVN under test/accessplatform/trunk/test.framework ) contains the basic framework for testing AccessPlatform. The first thing you need to do is build this.

To build the "test.framework" using Maven2, you simply type (from the test.framework project)

mvn clean install

This builds the jar under "target" and installs it into your Maven2 repository.

test.samples

The "test.samples" project (in SVN under test/accessplatform/trunk/test.samples ) contains a series of basic model samples for use in testing DataNucleus. These are the classes to be persisted, but do not include the information about how they will be persisted (that is specified in the individual test suite). The first thing you need to do is build this.

To build the "test.samples" using Maven2, you simply type (from the test.samples project)

mvn clean install

This builds the jar under "target" and installs it into your Maven2 repository.

DataNucleus : Test Suites

Now that you have the prerequisites built you can run each test suite with Maven2. Let's take the example of test.jdo.general . By default this will use HSQLDB as the datastore (see the Maven2 "profile" in use). and you run it like this

mvn clean test

To run tests with a different datastore (e.g xml) then specify it as the profile. Note that all datastores are not expected to pass to the same level.

mvn clean test -Pxml

Results are generated under target/surefire-reports