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)
(Prerequisites)
 
(14 intermediate revisions by 3 users not shown)
Line 1: Line 1:
==Running Integration tests inside the IDE==
+
==Running Integration tests within 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.<br/>
+
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.<br/>
 
For basic information configuring the Swordfish Target Platform, see [[Swordfish_Documentation:_Running_Target_Platform|Running Target Platform]].
 
For basic information configuring the Swordfish Target Platform, see [[Swordfish_Documentation:_Running_Target_Platform|Running Target Platform]].
  
=Prerequisites=
+
==Prerequisites==
* Eclipse Galileo RC4 or newer
+
* Eclipse Galileo <font color="#FF0000">RC4</font> 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)
 
* 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)
 +
<br>
  
=Preparing target platform for testing=
+
==Preparing target platform for testing==
 +
To prepare the target platform for testing:
 
<ol>
 
<ol>
<li>Please refer to the basic configuration of the target platform as shown in [[Swordfish_Documentation:_Running_Target_Platform|Running Target Platform]].</li>
+
<li>See information on the basic configuration of the target platform as described in [[Swordfish_Documentation:_Running_Target_Platform|Running Target Platform]].</li>
<li>Switch to the <b>Content</b> tab, select the <b>org.eclipse.swordfish.build/platform</b> location in the target platform and enable all bundles in this location.<br/>[[Image:EnablePlatformTestBundles.png]]<br/></li>
+
<li>Switch to the <b>Content</b> tab, select the <b>org.eclipse.swordfish.build/platform</b> location in the target platform and enable all bundles in this location.<br>[[Image:EnablePlatformTestBundles.png]]</li><br>
<li>Switch to the <b>Locations</b> tab, press <b>Add...</b> and create an <b>Installation</b> that points to <b>${eclipse_home}</b> and press <b>Finish</b>.<br/>[[Image:AddInstallationLocation.png]]<br/></li>
+
<li>Switch to the <b>Locations</b> tab, click <b>Add...</b> and create an <b>Installation</b> that points to <b>${eclipse_home}</b> and click <b>Finish</b>.<br/>[[Image:AddInstallationLocation.png]]</li><br>
<li>Press <b>Finish</b> to save your target platform configuration and make sure it is selected as active platform before you activate the target platform by pressing <b>OK</b>.</li>
+
<li>Click <b>Finish</b> to save your target platform configuration. NOTE: Ensure it is selected as the active platform before you activate the target platform by clicking <b>OK</b>.<br/>[[Image:TargetPlatformLocationOverview.png]]</li><br>
 
</ol>
 
</ol>
 
+
<br>
 
=Creating and starting a run or debug configuration=
 
=Creating and starting a run or debug configuration=
 +
To create and start a run or debug configuration:
 
<ol>
 
<ol>
<li>Make sure that the sample projects in your workspace are closed. Usually also the third party projects should be closed.</li>
+
<li>Ensure that the sample projects in your workspace are closed. For simplest case you could leave in workspace only projects from org.eclipse.swordfish.core.integrationtest folder.</li>
 +
<li>The third party projects in the workspace (projects residing in the org.eclipse.swordfish.third-parties directory in the SVN) should also 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>Below the <b>Test</b> tab ensure that <b>JUnit4</b> is selected as test runner.<br/>
<li>Main tab:  
+
[[Image:RunConfigurationTestTab.png]]</li><br>
<ul><li>Check to clear only logs stored in the workspace.</li>
+
<li><b>Main</b> tab:  
<li>Select <b>Run an application</b> and choose <b>[No Application] - Headless mode</b></li>
+
<ul><li>Check to clear only the 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>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>
+
<br>
<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>The <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><br>
<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>The <b>Plug-ins</b> tab should have the following values:  
 +
For <b>Launch with</b> the selection must be <b>all workspace and enabled target plug-ins</b>.[[Image:RunConfigurationPluginsTab.png]]</li><br>
 +
<li>Depending on the configuration, click <b>Run</b> or <b>Debug</b> to launch the test execution.<br>[[Image:TestRunResult.png]]</li><br>
 
</ol>
 
</ol>
 +
<br>
 +
----------------
 +
[[Swordfish_Documentation |Swordfish Documentation Home]] <br/>
 +
[[Swordfish | Swordfish Wiki Home]] <br/>

Latest revision as of 09:36, 10 June 2009

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

To create and start a run or debug configuration:

  1. Ensure that the sample projects in your workspace are closed. For simplest case you could leave in workspace only projects from org.eclipse.swordfish.core.integrationtest folder.
  2. The third party projects in the workspace (projects residing in the org.eclipse.swordfish.third-parties directory in the SVN) should also be closed.
  3. Create a new run configuration (JUnit plug-in test) for your integration test class.
  4. Below the Test tab ensure that JUnit4 is selected as test runner.
    RunConfigurationTestTab.png

  5. Main tab:
    • Check to clear only the 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

  6. The 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

  7. The Plug-ins tab should have the following values: For Launch with the selection must be all workspace and enabled target plug-ins.RunConfigurationPluginsTab.png

  8. Depending on the configuration, click Run or Debug to launch the test execution.
    TestRunResult.png



Swordfish Documentation Home
Swordfish Wiki Home

Back to the top