UNIT TEST IN ECLIPSE

  • Set the variables as shown in the diagram on the left.
  1. Remove the (default classpath) entry. It will be the project name followed by (default classpath). Remove it.
  2. Click on User Entries.
  3. Add conf-openejb-local from business tests. Choose Advanced... > Add Folders, then from your project choose business/src/test/conf-openejb-local/.
  4. Add jumpstart.jar from exploded. Choose Advanced... > Add Folders, then from your project choose exploded/jumpstart.ear/jumpstart.jar/.
  5. Add JARs from business libs. Choose Add JARs..., open your project, then choose these JARs:
  6. Move conf and jumpstart.jar to the top. Otherwise there will be problems (eg. log4j.properties is in conf and bsf.jar).

Problems? Eclipse might not be ready for junit - see Could not create task or type of type: junit.

 

©2008 Geoff Callender, Sydney, Australia