last updated: October 23, 2002
This document describes how to run JUnit test plugins in Eclipse from the command line using Eclipse JUnit test plugins (see Appendix A for listing) and a testing framework. This method of running tests is intended for anyone who wishes to automate their testing process or reproduce the testing mechanism used in Eclipse builds by the Eclipse Release Engineering team.
Click here for a description of the testing framework, and how it can be used outside of the setup described here.
If you simply wish to write and run JUnit tests interactively from an Eclipse workbench, try one of the links below:
Support in Eclipse
1. All test machines will require a java runtime environment (version 1.3 or
higher) installed and added to the path environment variable.
2. Info-ZIP UnZip version 5.41 or later installed and added to the path.
3. The Automated Test feature from an Eclipse build (http://www.eclipse.org/downloads/index.php). This contains the test framework plugin and the test plugins to run.
4. An Eclipse SDK zip file (http://www.eclipse.org/downloads/index.php) to test. Usually you will want to test a particular Eclipse build using a matching Automated Tests feature.
To run the Team CVS tests you will need extssh access to a CVS repository. The tests create a lot of junk modules and tags so you will want to keep the test repository seperate from your development repository. While it is not necessary to clean up the repository between each Team test run you will probably want to clean it up periodically.
1. Extract the eclipse-Automated-Tests-<buildid>.zip. This will create
a top-level directory "eclipse-testing".
2. Place the Eclipse SDK zip file to test in the eclipse-testing directory. Do not unzip this file. (The test scripts will take care of this)
3. To run the Team CVS tests edit the test.xml script to provide connection information.
Replace the following strings in the "teamcvs" target of the test.xml file with the information described below:
These values are used at test time to automatically replace strings in org.eclipse.team.tests.cvs.core/repository.properties. For more information on how this file is used in the team CVS tests, click here.
1. cd to the eclipse-testing directory
2. Run the following script:
runtests [-os <operating system>] [-ws <windowing system>] [-arch <architecture>] [-noclean] [<testTarget>]All parameters and targets are optional on windows systems. Just running "runtests" will run ALL tests on Windows, installing a clean Eclipse between each test target. On *nix systems, the os, ws and arch parameters must be specified.
|-os <operating system>||The OS the tests are being run on. One of: aix, hpux, linux, qnx, solaris, win32. Default win32|
|-ws <windowing system>||The windowing system the tests are being run on. One of: motif, gtk, photon, win32. Default win32|
|-arch <architecture>||The architecture the tests are being run on. One of: ppc, PA_RISC, x86, sparc. Default x86|
|-noclean||Run tests without installing a clean Eclipse between test targets. Default is to install a clean Eclipse between test targets.|
Specifies which ant target to run in the main test.xml. Typically this corresponds to a test project's tests. If you do not specify a test target then the all test target is run.
|all||Runs all the targets below excluding the JDT-Core components tests.|
|all14||Runs all the JDT-Core component tests and genHtml. This target requires a 1.4 level java virtual machine on the path.|
|ant||Runs the JUnit plugin tests for the Platform-Ant component.|
|core||Runs the JUnit plugin tests for the Platform-Core component.|
|help||Runs the JUnit plugin tests for the Platform-Help component.|
|jdtcorebuilder||Runs the JUnit plugin tests for the JDT-Core component.|
|jdtcorecompiler||Runs the JUnit plugin tests for the JDT-Core component.|
|jdtcoremodel||Runs the JUnit plugin tests for the JDT-Core component.|
|jdtdebug||Runs the JUnit plugin tests for the JDT-Debug component.|
|jdtui||Runs the JUnit plugin tests for the JDT-UI component.|
|jdtuirefactoring||Rruns additional JUnit plugin tests for the JDT-UI component.|
|swt||Runs the JUnit plugin tests for the Platform-SWT component. This target is executed on Windows operating systems only.|
|teamcore||Runs the JUnit plugin tests for the Platform-VCM component.|
|teamcvs||Runs additional JUnit plugin tests for the Platform-VCM component.|
|ui||Runs the JUnit plugin tests for the Platform-UI component.|
|update||Runs the JUnit plugin tests for the Platform-Update component.|
|genHtml||Converts xml test results in the "eclipse-testing\results" directory to html.|
Appendix A - JUnit test plugins
The test plugins listed below are available from the dev.eclipse.org cvs repository and are available in binary distributable format from the Eclipse downloads page.
* indicates the plugin that contains the test.xml if component has more than one JUnit test plugin
|Component||JUnit plugin tests|
Appendix B- Supported os, ws, and arch value combinations
The following table contains the values that can be used with the -os, -ws, and -arch switches.
|Operating System (os)||Windowing System (ws)||Architecture (arch)|