E4/Compatibility/Testing

From Eclipsepedia

Jump to: navigation, search

This is now a historical document. The org.eclipse.ui.tests code is run as part of the Eclipse SDK build.


This page describes how to run the 3.x API tests with a workbench that's backed by e4's compatibility layer.

Setup

  1. Download a recent e4 SDK here.
  2. Add this CVS repository location to your workspace setup: :pserver:anonymous@dev.eclipse.org:/cvsroot/eclipse
  3. Checkout the org.eclipse.e4.ui.releng module from the /cvsroot/eclipse's e4/releng directory.
  4. Right-click on the e4.ui.compatibility.psf file and select 'Import project set...'. When you are prompted for a password, just enter anonymous as your user name and leave the password as blank.
  5. Repeat the procedure for e4.ui.psf, e4.ui.css.psf, and e4.ui.tests.compatibility.psf. You will have errors.

Running the tests

  1. Select a test from the org.eclipse.ui.tests bundle, such as org.eclipse.ui.tests.api.IWorkbenchPageTest for example.
  2. If there are compiler errors indicating incorrect imports, try using 'Organize Imports' to get rid of them or to have them point to the e4 variant of the internal.
  3. Right-click on the file > Run As > JUnit Plug-in Test.
  4. This will fail. Open the launch configuration dialog.
  5. Select the launch configuration that was just generated and go to the 'Main' tab.
  6. Change the target product to org.eclipse.e4.ide.application.product.
  7. Try running the test again. It should work now.