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 "Eclipse/Testing"

 
(Session tests)
Line 18: Line 18:
 
== Session tests ==
 
== Session tests ==
  
See the [[Session Tests]] page.
+
[[Session Tests]] in Eclipse are tests that require that a new Eclipse session be launched for every test case run. Thus, they have additional requirements regarding controling the environment test cases are run (VM, set of plug-ins available, configuration, instance location, command line parameters) and how results are communicated back to the test runner.
  
 
== Performance tests ==
 
== Performance tests ==
  
 
See the [http://dev.eclipse.org/viewcvs/index.cgi/%7Echeckout%7E/org.eclipse.test.performance/doc/Performance%20Tests%20HowTo.html Performance Tests How-to]
 
See the [http://dev.eclipse.org/viewcvs/index.cgi/%7Echeckout%7E/org.eclipse.test.performance/doc/Performance%20Tests%20HowTo.html Performance Tests How-to]

Revision as of 18:51, 3 February 2006

The Eclipse Platform is tested during every build by an extensive suite of automated tests. These tests are written using the JUnit test framework. This page contains links to information about how to run and create automated tests for the platform.

Correctness tests

The majority of automated tests are testing for program correctness. A test failure on these tests implies that program behaviour is not as expected by the tests. These tests are run every build on Windows, Linux, and Mac OSX.

Running tests from within Eclipse

Correctness tests can be run manually from within the Eclipse IDE using a "JUnit Plug-in Test" launch configuration:

  1. Check out the test plugin containing the tests you want to run, along with any prerequisite plug-ins. All tests need at least the org.junit plugin, and org.eclipse.core.tests.harness.
  2. In the Navigator or Package Explorer, select the test or test suite you want to run. Each test package typically contains a TestSuite class that contains all the tests in that package. Suites from multiple packages are then aggregated into higher level suites. For UI tests, the class UiTestSuite can be used to run all tests in that plugin. For core tests, each plugin contains an AutomatedTests class that contains all the tests from that plugin.
  3. Select Run > Run...
  4. Choose the "JUnit Plug-in Test" category, and click the button to create a new test
  5. On the "Main" tab, select the appropriate application for that test. For UI tests, select "org.eclipse.ui.ide.workbench". For core tests, select "[No Application] - Headless Mode".
  6. Click Run.

Session tests

Session Tests in Eclipse are tests that require that a new Eclipse session be launched for every test case run. Thus, they have additional requirements regarding controling the environment test cases are run (VM, set of plug-ins available, configuration, instance location, command line parameters) and how results are communicated back to the test runner.

Performance tests

See the Performance Tests How-to

Back to the top