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 "Orion/Running the tests"

(Setting up)
(Setting up)
Line 54: Line 54:
 
## Click Finish.
 
## Click Finish.
 
## Now there should be 2 locations shown in your target definition. Click Finish.<br>[[Image:Orion-target-result.png]]
 
## Now there should be 2 locations shown in your target definition. Click Finish.<br>[[Image:Orion-target-result.png]]
# Checkout these projects from the [[CVS_Howto#Anonymous_CVS|Eclipse Platform CVS repository]] (<code>/cvsroot/eclipse</code>):
+
# Now we will checkout the remaining test dependencies from CVS. Download this file:<br>[[Image:OrionServerTestDepdendencies.psf]].
#* org.eclipse.core.runtime.compatibility
+
# In your Eclipse IDE, go to File -> Import -> Team -> Team Project Set, select OrionServerTestDependencies.psf, and click Finish.
#* org.eclipse.core.runtime.compatibility.auth
+
#* org.eclipse.core.tests.harness
+
#* org.eclipse.core.tests.resources
+
#* org.eclipse.test.performance
+
#* org.eclipse.test.performance.data
+
#* org.eclipse.test.performance.win32
+
# Checkout these additional libraries from the [[Orbit_Faq#How_do_I_work_with_a_bundle_in_Orbit.3F|Orbit CVS repository]] (<code>/cvsroot/tools</code>):
+
#* javax.mail.glassfish (Branch '''v1_4_1''')
+
#* org.antlr.runtime (Branch '''v3_2_0''')
+
#* org.hamcrest.core (Branch '''v1_1''')
+
#* org.junit (Branch '''v3_8_2''')
+
#* org.junit4 (Branch '''v4_8_2''')
+
 
# At this point you should have no Java compilation errors. You can now run the tests.
 
# At this point you should have no Java compilation errors. You can now run the tests.
 +
 +
==== Manually checking out the dependent projects ====
 +
If the previous section fails for some reason, here's the list of projects from the .psf file. You can check them out manually if need be.
 +
 +
Projects from the [[CVS_Howto#Anonymous_CVS|Eclipse Platform CVS repository]] (<code>/cvsroot/eclipse</code>):
 +
* org.eclipse.core.runtime.compatibility
 +
* org.eclipse.core.runtime.compatibility.auth
 +
* org.eclipse.core.tests.harness
 +
* org.eclipse.core.tests.resources
 +
* org.eclipse.test.performance
 +
* org.eclipse.test.performance.data
 +
* org.eclipse.test.performance.win32
 +
 +
Projects from the [[Orbit_Faq#How_do_I_work_with_a_bundle_in_Orbit.3F|Orbit CVS repository]] (<code>/cvsroot/tools</code>):
 +
* javax.mail.glassfish (Branch '''v1_4_1''')
 +
* org.antlr.runtime (Branch '''v3_2_0''')
 +
* org.hamcrest.core (Branch '''v1_1''')
 +
* org.junit (Branch '''v3_8_2''')
 +
* org.junit4 (Branch '''v4_8_2''')
  
 
=== Running ===
 
=== Running ===

Revision as of 10:09, 19 June 2012

Client tests

Running a test

  • Tests are located under the js-test folders.
  • A test is defined by an HTML file, typically named test.html.
  • To run a test, load its test.html file in your browser. (Example: http://[your_orion_server]/js-tests/serviceRegistry/test.html )
    • Test output is printed to the JavaScript console.


Server tests

Setting up

  1. Set up your Eclipse IDE as explained in Orion/Getting the source.
  2. Make sure you have imported the test projects into your workspace, and they're open:
    • org.eclipse.orion.server.tests
    • org.eclipse.orion.server.tests.feature
  3. The test projects have additional dependencies over the rest of the Orion source code. The next 3 steps explain how to satisfy them.
  4. Add the plugins from your Eclipse SDK to your target platform:
    1. Go to Preferences > Target Platform, select your target definition and click Edit.
    2. Click Add... > Installation, then type ${eclipse_home} in the Location field.
    3. Click Finish.
    4. Now there should be 2 locations shown in your target definition. Click Finish.
      Orion-target-result.png
  5. Now we will checkout the remaining test dependencies from CVS. Download this file:
    File:OrionServerTestDepdendencies.psf.
  6. In your Eclipse IDE, go to File -> Import -> Team -> Team Project Set, select OrionServerTestDependencies.psf, and click Finish.
  7. At this point you should have no Java compilation errors. You can now run the tests.

Manually checking out the dependent projects

If the previous section fails for some reason, here's the list of projects from the .psf file. You can check them out manually if need be.

Projects from the Eclipse Platform CVS repository (/cvsroot/eclipse):

  • org.eclipse.core.runtime.compatibility
  • org.eclipse.core.runtime.compatibility.auth
  • org.eclipse.core.tests.harness
  • org.eclipse.core.tests.resources
  • org.eclipse.test.performance
  • org.eclipse.test.performance.data
  • org.eclipse.test.performance.win32

Projects from the Orbit CVS repository (/cvsroot/tools):

  • javax.mail.glassfish (Branch v1_4_1)
  • org.antlr.runtime (Branch v3_2_0)
  • org.hamcrest.core (Branch v1_1)
  • org.junit (Branch v3_8_2)
  • org.junit4 (Branch v4_8_2)

Running

  1. Go to the org.eclipse.orion.server.tests project.
  2. Open the launchConfigurations folder, right-click All Server Tests.launch and choose Run As > All Server Tests.
  3. The JUnit view will open and display the test results.

To run just a subset of the tests, edit the launch configuration (Run > Run Configurations).

Back to the top