Development
Documentation
Testing
Testing DataNucleus with Eclipse

DataNucleus can be easily tested using Eclipse. Please refer to Building with Eclipse for details of building the plugins. This guide is currently incomplete - please volunteer updates to it for the benefit of others



Debugging Tests in Eclipse

Debugging DataNucleus unit tests might be very boring, but there is a way of reducing the pain in Eclipse using the DataNucleus Eclipse Plugin. Follow the next steps to make this easier:

  1. Install the DataNucleus Eclipse Plugin.
  2. Add enhancement to the DataNucleus project. Right Click on the project > DataNucleus > Enhance with DataNucleus 1.1 .

  3. Setup the enhancement. Right Click on the project > DataNucleus > Enhance setup . If you are going to run the test in General or Datastore Scenario use "jdo,jdod" as suffix for jdo files and for Application Scenario use "jdo,jdoa".

  4. Run a JUNIT test in DEBUG mode, but first, you must setup some configuration to run the tests







    Don't forget to set the jdo file suffix for the Scenario you are going to run.

Debugging Enhancer in Eclipse

To debug the DataNucleus enhancement, follow the next steps:

  1. Create a new Java application for run or debug. In Eclipse, click on the menu Run and Run... or Debug... .
  2. Click on the Java Application and New
  3. Set up the configuration as presented on the next screenshots.



  4. Input all of the jdo (jdo,jdod,jdoa) files with space to separate each file.



  5. Make sure the classpath is correct.



  6. That's all. Now run it in debug mode.