UNIT TEST IN ECLIPSE

  • Choose Run > Run Configurations.... The Run Configurations window will appear.
  • Right-click on JUnit and choose New.
  • Set Test runner to JUnit 4.
  • Set the other variables to values similar to those in the screen shot on the right.
  • Click on the Classpath tab.
  • Remove the (default classpath) entry.
  • Click on User Entries.
  • Add these 2 folders (Advanced... > Add folders):
    business/src/test/conf/
    collapsed/jumpstart.war/WEB-INF/classes/
  • Add all JARs from these folders:
    business/src/main/lib-compile/
    business/src/main/lib-runtime/ (actually, lib-runtime is empty)
    business/src/test/lib-test/
  • Ensure the two folders are at the top. It avoids conflicts.

 

©2017, 2018 Geoff Callender, Sydney, Australia