Skip to main content

Notice: this Wiki will be going read only early in 2024 and edits will no longer be possible. Please see: https://gitlab.eclipse.org/eclipsefdn/helpdesk/-/wikis/Wiki-shutdown-plan for the plan.

Jump to: navigation, search

Difference between revisions of "EclipseLink/Development/Testing/foundation"

(Running the Legacy LRG)
(Running the Legacy LRG)
Line 7: Line 7:
 
# Use org.eclipse.persistence.testing.framework.ui.TestingBrowserFrame as the main class
 
# Use org.eclipse.persistence.testing.framework.ui.TestingBrowserFrame as the main class
 
# Add "-Xmx256m -Djava.security.manager" to the VM arguments section of the Arguments tab
 
# Add "-Xmx256m -Djava.security.manager" to the VM arguments section of the Arguments tab
#:  
+
#: in your $JRE_HOME/lib/security, move the exiting java.policy file aside (i.e. rename to java.policy.org) and create a new java.policy file with the following 3 lines:
 +
<pre>
 +
grant {
 +
  permission java.security.AllPermission;
 +
};
 +
</pre>
 
# Add the following to the classpath: (note these are listed by category and you may be able to run subsets of the tests without certain categories)
 
# Add the following to the classpath: (note these are listed by category and you may be able to run subsets of the tests without certain categories)
 
## JDBC
 
## JDBC

Revision as of 12:36, 16 November 2007

Running the Legacy LRG

Early in its existance, this product was tested with an in-house testing framework. A large number of tests are still available through this test framework. Testing is gradually being migrated to frameworks such as JUnit, but the GUI tool available in the legacy framework is still quite useful for testing. The code for this test framework is stored in the eclipselink.core.test project. Here is how to run it:

  1. Run the process.resource target of the build.xml in the base directory of the ecliposelink.core.test project as an ant script. This will copy some xml files to your classpath.
  2. Create a Java Application run target on the eclipselink.core.test project - I'll call it Testing Browser
  3. Use org.eclipse.persistence.testing.framework.ui.TestingBrowserFrame as the main class
  4. Add "-Xmx256m -Djava.security.manager" to the VM arguments section of the Arguments tab
    in your $JRE_HOME/lib/security, move the exiting java.policy file aside (i.e. rename to java.policy.org) and create a new java.policy file with the following 3 lines:
grant {
  permission java.security.AllPermission;
};
  1. Add the following to the classpath: (note these are listed by category and you may be able to run subsets of the tests without certain categories)
    1. JDBC
      1. your JDBC driver of choice
    2. JPA
      1. jpa.core
      2. jpa.test
    3. Oracle Extensions
      1. eclipselink.extension.oracle
      2. eclipselink.extension.oracle.test
      3. jars required to compile eclipselink.extension.oracle - aqapi.jar, sdoapi.jar, dms.jar, xdb.jar, xml.jar, xmlparserv2.jar
    4. Java
      1. a JAVA_TOOLS_LIB variable that points to the tools jar in your java installation
    5. Generated classes
      1. Add the base directory of the eclipselink.core.test project. For some reason, this is where all java output goes. We output some java files and then compile them. They will go there.
  2. Run the the "Testing Browser" run target
  3. Input you DB login information. You can do this by selecting a value from the "Quick Login" drop box and then then edit the form on the right side of the GUI with any information that is different from what is already populated
  4. Run either the SRGTestModel or the LRGTestModel listed on the right side of the GUI by selecting it and then clicking the "Run Test" button.

Back to the top