Skip to main content

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.

Jump to: navigation, search

Swordfish Documentation: Running IDE Integration Tests

Revision as of 09:20, 9 June 2009 by Unnamed Poltroon (Talk)

Running Integration tests within the IDE

This section contains instructions on configuring the Swordfish Target Platform and running configurations in order to run and (or)debug integration tests from within the Eclipse IDE.
For basic information configuring the Swordfish Target Platform, see Running Target Platform.

Prerequisites

  • Eclipse Galileo RC4 or newer
  • JDK 1.6.* as run time for tests (due to run time requirements in some Eclipse bundles) must be configured as available JRE (JDK 1.5 may still be the default)

Preparing target platform for testing

To prepare the target platform for testing:

  1. See information on the basic configuration of the target platform as described in Running Target Platform.
  2. Switch to the Content tab, select the org.eclipse.swordfish.build/platform location in the target platform and enable all bundles in this location.
    EnablePlatformTestBundles.png
  3. Switch to the Locations tab, click Add... and create an Installation that points to ${eclipse_home} and click Finish.
    AddInstallationLocation.png
  4. Click Finish to save your target platform configuration. NOTE: Ensure it is selected as the active platform before you activate the target platform by clicking OK.
    TargetPlatformLocationOverview.png

Creating and starting a run or debug configuration

  1. Make sure that the sample projects in your workspace are closed. Usually also the third party projects should be closed.
  2. Create a new run configuration (JUnit plug-in test) for your integration test class.
  3. Test tab: make sure that JUnit4 is selected as test runner.
    RunConfigurationTestTab.png
  4. Main tab:
    • Check to clear only logs stored in the workspace.
    • Select Run an application and choose [No Application] - Headless Mode
    • Select Runtime JRE and choose JVM 1.6.0

    RunConfigurationMainTab.png
  5. Arguments tab: Should contain the configuration as defined in the target platform (on creation of a run configuration Eclipse copies the entries from the target platform)
    RunConfigurationArgumentsTab.png
  6. Plug-ins tab: For Launch with the selection has to be All workspace and enabled target plug-ins.
    RunConfigurationPluginsTab.png
  7. Depending on the configuration type press the button Run or Debug to launch the test execution.
    TestRunResult.png



Swordfish Documentation Home
Swordfish Wiki Home

Back to the top