Apache OpenMeetings Demo | Download | Installation | Wiki  


apache-incubator-logo-no-borders.png
Introduction

Automatic tests are the significant part of development process. Below is the instruction of how to run Openmeetings JUnit tests.


Details
  1. running tests using command line:
    • all tests:
    • ant test
    • subset of tests by mask:
    • ant -Dtestcases=TestError* test
  2. running tests from Eclipse IDE:
    • ant -Ddb=<your_DB> prepare-eclipse
    • Start Eclipse
    • Load workspace with Openmeetings project (or refresh existing project)
    • Select "Debug Configurations..."

  • Create New Junit configuration, give it a name and select test class

  • Select Arguments tab
  • Add the following code to the VM section
  • -javaagent:${workspace_loc:Openmeetings}/build/lib/om/openjpa-bundle-2.2.0.jar -Dwebapps.root=${workspace_loc:Openmeetings}/dist/red5/webapps/openmeetings
  • To avoid temporary files being created in OM root, modify "Working Directory" as follows
  • ${workspace_loc:Openmeetings}/build/junit

  • Select Debug
  • Note: You need a file called "persistence.xml" in src/META-INF if you run the JUnit test from inside Eclipse. Normally "ant prepare-eclipse" should do that for you.



Copyright © 2003-2012, The Apache Software Foundation