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 "Swordfish Documentation: Running IDE Integration Tests"

(Creating and starting a run or debug configuration)
(Creating and starting a run or debug configuration)
Line 19: Line 19:
 
<li>Make sure that the sample projects in your workspace are closed. Usually also the third party projects should be closed.</li>
 
<li>Make sure that the sample projects in your workspace are closed. Usually also the third party projects should be closed.</li>
 
<li>Create a new run configuration (<b>JUnit plug-in test</b>) for your integration test class.</li>
 
<li>Create a new run configuration (<b>JUnit plug-in test</b>) for your integration test class.</li>
<li>Test tab: make sure that <b>JUnit4</b> is selected as test runner.<br/>[[Image:RunConfigurationTestTab.png]]</li>
+
<li><b>Test</b> tab: make sure that <b>JUnit4</b> is selected as test runner.<br/>[[Image:RunConfigurationTestTab.png]]</li>
<li>Main tab:  
+
<li><b>Main</b> tab:  
 
<ul><li>Check to clear only logs stored in the workspace.</li>
 
<ul><li>Check to clear only logs stored in the workspace.</li>
 
<li>Select <b>Run an application</b> and choose <b>[No Application] - Headless Mode</b></li>
 
<li>Select <b>Run an application</b> and choose <b>[No Application] - Headless Mode</b></li>
 
<li>Select <b>Runtime JRE</b> and choose <b>JVM 1.6.0</b></li></ul><br/>[[Image:RunConfigurationMainTab.png]]
 
<li>Select <b>Runtime JRE</b> and choose <b>JVM 1.6.0</b></li></ul><br/>[[Image:RunConfigurationMainTab.png]]
 
</li>
 
</li>
<li>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)<br/>[[Image:RunConfigurationArgumentsTab.png]]</li>
+
<li><b>Arguments</b> 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)<br/>[[Image:RunConfigurationArgumentsTab.png]]</li>
<li>Plug-ins tab: For <b>Launch with</b> the selection has to be <b>All workspace and enabled target plug-ins</b>.<br/>[[Image:RunConfigurationPluginsTab.png]]</li>
+
<li><b>Plug-ins</b> tab: For <b>Launch with</b> the selection has to be <b>All workspace and enabled target plug-ins</b>.<br/>[[Image:RunConfigurationPluginsTab.png]]</li>
 
<li>Depending on the configuration type press the button <b>Run</b> or <b>Debug</b> to launch the test execution.<br/>[[Image:TestRunResult.png]]</li>
 
<li>Depending on the configuration type press the button <b>Run</b> or <b>Debug</b> to launch the test execution.<br/>[[Image:TestRunResult.png]]</li>
 
</ol>
 
</ol>

Revision as of 07:56, 9 June 2009

Running Integration tests inside the IDE

This section contains instructions on setting configuring the Swordfish Target Platform and run configurations for running / debugging integration tests inside 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

  1. Please refer to the basic configuration of the target platform as shown 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, press Add... and create an Installation that points to ${eclipse_home} and press Finish.
    AddInstallationLocation.png
  4. Press Finish to save your target platform configuration and make sure it is selected as active platform before you activate the target platform by pressing OK.

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

Back to the top