Notice: This Wiki is now read only and edits are no longer possible. Please see: https://gitlab.eclipse.org/eclipsefdn/helpdesk/-/wikis/Wiki-shutdown-plan for the plan.
Difference between revisions of "EclipseLink/Development/Testing/SDO"
< EclipseLink | Development | Testing
(→Building & Running the SDO Junit tests) |
(→Building & Running the SDO Junit tests) |
||
Line 15: | Line 15: | ||
**junit.lib=<JUNIT_HOME>/junit.jar | **junit.lib=<JUNIT_HOME>/junit.jar | ||
**tools.lib=<JAVA_HOME/lib/tools.jar | **tools.lib=<JAVA_HOME/lib/tools.jar | ||
− | # Currently an integrated test suite that will run all EclipseLink projects including SDO is being developed. You can run the test suite | + | # Currently an integrated test suite that will run all EclipseLink projects including SDO is being developed. You can run the SDO test suite by overriding some variables in your <user-dir>/build.properties depending on whether you are running inside an eclipse workspace(2) or not (1). |
## Running ant outside an eclipse workspace | ## Running ant outside an eclipse workspace | ||
### Leave eclipslink.* variables as-is on the local build.properties | ### Leave eclipslink.* variables as-is on the local build.properties | ||
## Running ant inside an eclipse workspace | ## Running ant inside an eclipse workspace | ||
− | ### Modify | + | ### Modify the following variables to account for the different directory structure... |
####eclipselink.core=../../foundation/eclipselink.core | ####eclipselink.core=../../foundation/eclipselink.core | ||
####eclipselink.core.lib=../../foundation/eclipselink.core.lib | ####eclipselink.core.lib=../../foundation/eclipselink.core.lib | ||
*'''Configuration options''' | *'''Configuration options''' | ||
− | *The tests run | + | *The tests run by default using a non-static customContext=true which is the mode that will normally be used in a multithreaded container. |
**customContext = true (run test using an thread-safe instantiable instance of SDOHelperContext) - default | **customContext = true (run test using an thread-safe instantiable instance of SDOHelperContext) - default | ||
**customContext = false (run test using static HelperContext Singleton) | **customContext = false (run test using static HelperContext Singleton) | ||
Line 33: | Line 33: | ||
# Running using Ant | # Running using Ant | ||
## Navigate to the <workspace>/eclipselink.sdo.test directory | ## Navigate to the <workspace>/eclipselink.sdo.test directory | ||
− | ## Run the sdo.test/build.xml by typing "ant". This will compile in order eclipselink.core, eclipselink.sdo and eclipselink.sdo.test. | + | ## Run the sdo.test/build.xml by typing "ant". This will compile in order eclipselink.core, eclipselink.sdo and eclipselink.sdo.test and should take around 2-4 min. |
+ | ## View results in the reports subdirectory | ||
# Running using Eclipse | # Running using Eclipse | ||
## Setting up Eclipse | ## Setting up Eclipse | ||
− | ### | + | ### Checkout 5 of 11 new projects (projects will be created inside the workspace) (core,core.lib,sdo,sdo.lib,sdo.test) using SVN (turn off automatic build temporarily) |
[[Image:eclipselink_sdo_java_projects_workspace_ide__cap.jpg|800px]] | [[Image:eclipselink_sdo_java_projects_workspace_ide__cap.jpg|800px]] | ||
− | # | + | ### Goto "Running a suite" |
+ | |||
* '''2) Building & Running within a Subversion checkout (outside an eclipse workspace) | * '''2) Building & Running within a Subversion checkout (outside an eclipse workspace) | ||
Line 55: | Line 57: | ||
##[[Image:eclipselink_sdo_java_projects_ide_cap.jpg]] | ##[[Image:eclipselink_sdo_java_projects_ide_cap.jpg]] | ||
## At this point you should get 2 errors if the TOOLS_LIB variable is not set for sdo.test. Set this variable globally using Window | Preferences | Java | Build Path | Classpath Variables - new -> name=TOOLS_LIB, path==<JAVA_HOME/lib/tools.jar | ## At this point you should get 2 errors if the TOOLS_LIB variable is not set for sdo.test. Set this variable globally using Window | Preferences | Java | Build Path | Classpath Variables - new -> name=TOOLS_LIB, path==<JAVA_HOME/lib/tools.jar | ||
− | # Running a suite | + | ## Goto "Running a suite" |
− | ## Pick a suite - we will use org.eclipse.persistence.testing.sdo.model.sequence.SDOSequenceTestCS as it is small and utilizes resources as well as core xsd/xml define/load functions. | + | |
− | + | Running a suite | |
− | + | # Turn "build automatically" back on to build classes | |
− | + | # Pick a suite - we will use org.eclipse.persistence.testing.sdo.model.sequence.SDOSequenceTestCS as it is small and utilizes resources as well as core xsd/xml define/load functions. | |
− | + | # Create a new java application run/debug target | |
+ | # Modify the arguments tab|working directory to point to ${workspace_loc:eclipselink.sdo.test/resource} or create a resource variable to reuse in other targets - this is where all tests will execute. | ||
+ | #[[Image:eclipselink_sdo_test_working_directory.jpg|500px]] | ||
+ | # Run the test and observe results in the Console | ||
Revision as of 15:44, 25 October 2007
Summary
This page is intended to outline the setup and execution steps required to successfully run the SDO JUnit tests. There are 2 ways to develop using EclipseLink.
- Checkout using subclipse all projects individually into your eclipse workspace and develop/debug there by using eclipse to build classes.
- Checkout using tortoiseSVN the root trunk into a folder outside your workspace and either use ant to build an eclipselink.jar or create proxy projects using link to source from eclipse - Recommended if you would like to build the eclipselink.jar
Building & Running the SDO Junit tests
Prerequisites:
- Eclipse installed with the subclipse pluggin or TortoiseSVN for out of eclipse checkouts
- Required projects eclipselink.core and eclipselink.lib checked out into workspace/view
- eclipselink.sdo, eclipselink.sdo.lib and eclipselink.sdo.test checked out into workspace/view
- Edit build.properties either at this project level or globally in your user directory.
- Windows: C:\Documents and Settings\<user-dir> Linux:
- javaee.lib=<jar_location>/javaee.jar
- junit.lib=<JUNIT_HOME>/junit.jar
- tools.lib=<JAVA_HOME/lib/tools.jar
- Currently an integrated test suite that will run all EclipseLink projects including SDO is being developed. You can run the SDO test suite by overriding some variables in your <user-dir>/build.properties depending on whether you are running inside an eclipse workspace(2) or not (1).
- Running ant outside an eclipse workspace
- Leave eclipslink.* variables as-is on the local build.properties
- Running ant inside an eclipse workspace
- Modify the following variables to account for the different directory structure...
- eclipselink.core=../../foundation/eclipselink.core
- eclipselink.core.lib=../../foundation/eclipselink.core.lib
- Modify the following variables to account for the different directory structure...
- Running ant outside an eclipse workspace
- Configuration options
- The tests run by default using a non-static customContext=true which is the mode that will normally be used in a multithreaded container.
- customContext = true (run test using an thread-safe instantiable instance of SDOHelperContext) - default
- customContext = false (run test using static HelperContext Singleton)
- 1) Building & Running within an Eclipse Workspace via subclipse checkout
The SDO test suite is written using JUnit. It consists of a set of jars that contain various tests and resources. The SDO tests are contained in the eclipselink.sdo.test project
- Running using Ant
- Navigate to the <workspace>/eclipselink.sdo.test directory
- Run the sdo.test/build.xml by typing "ant". This will compile in order eclipselink.core, eclipselink.sdo and eclipselink.sdo.test and should take around 2-4 min.
- View results in the reports subdirectory
- Running using Eclipse
- Setting up Eclipse
- Checkout 5 of 11 new projects (projects will be created inside the workspace) (core,core.lib,sdo,sdo.lib,sdo.test) using SVN (turn off automatic build temporarily)
- Setting up Eclipse
- Goto "Running a suite"
- 2) Building & Running within a Subversion checkout (outside an eclipse workspace)
- Create your own view directory - for example "c:/view_el/"
- Check out the SVN project for SDO into this directory using the format svn+ssh://<username>@<svn_session>/svnroot/technology/org.eclipse.persistence/trunk
- Either build all 4 core, jpa, moxy and sdo projects into an eclipselink.jar by following the instructions in Building EclipseLink Source - specifically the section on setting up the extension jars not included in eclipselink.core.lib, or allow the sdo test script to run off classes by doing the following...
- Edit your local or global build.properties file
- Navigate to the eclipselink.sdo.test directory
- Run sdo.test/build.xml by typing "ant"
- View results in the reports subdirectory under true|false
- Setting up Eclipse
- Create 5 of 11 new projects (core,core.lib,sdo,sdo.lib,sdo.test) from existing source = "c:/view_el/eclipselink.* (turn off automatic build temporarily)
- At this point you should get 2 errors if the TOOLS_LIB variable is not set for sdo.test. Set this variable globally using Window | Preferences | Java | Build Path | Classpath Variables - new -> name=TOOLS_LIB, path==<JAVA_HOME/lib/tools.jar
- Goto "Running a suite"
Running a suite
- Turn "build automatically" back on to build classes
- Pick a suite - we will use org.eclipse.persistence.testing.sdo.model.sequence.SDOSequenceTestCS as it is small and utilizes resources as well as core xsd/xml define/load functions.
- Create a new java application run/debug target
- Modify the arguments tab|working directory to point to ${workspace_loc:eclipselink.sdo.test/resource} or create a resource variable to reuse in other targets - this is where all tests will execute.
- Run the test and observe results in the Console
- Interpreting Test Results
- See the test results page at []
- Depending on the value of the customContext variable look under the true|false subdirectory in junit-noframes.html