Skip to content

Commit 83fed46

Browse files
committed
Using JUnit Plug-in for FAQ instead of PDE JUnit test
This aligns with the UI usage in the Eclipse IDE
1 parent 15c5072 commit 83fed46

File tree

2 files changed

+12
-18
lines changed

2 files changed

+12
-18
lines changed

docs/FAQ/FAQ_What_is_a_PDE_JUnit_test.md

Lines changed: 11 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -1,23 +1,17 @@
1+
# FAQ What is a JUnit Plug-in test?
12

2-
3-
FAQ What is a PDE JUnit test?
4-
=============================
5-
6-
PDE JUnit tests are used to write unit tests for your plug-ins. The tests themselves look exactly like any other JUnit test, organized into TestCase subclasses, one test per method, with setUp and tearDown methods for creating and discarding any state required by the test.
7-
8-
9-
10-
11-
The difference with PDE JUnit tests is in how they are executed. Instead of using the standard JUnit class TestRunner, PDE JUnit tests are executed by a special test runner that launches another Eclipse instance in a separate VM-just like a runtime workbench-and executes the test methods within that workbench. This means your tests can call Eclipse Platform API, along with methods from your own plug-in, to exercise the functionality you want to test.
12-
13-
14-
3+
JUnit Plug-in tests are used to write unit tests for your plug-ins.
4+
The tests themselves look exactly like any other JUnit test.
155

16-
PDE JUnit tests are launched by selecting your test class and pressing **Run > Run As > JUnit Plug-in Test**. On the **Arguments** tab of the launch configuration dialog, you can choose what Eclipse application will be used to run your tests. By default, the Eclipse IDE workbench is used. If you are not testing user-interface components, you can choose **\[No Application\] - Headless Mode**. If you have written your own Eclipse application-such as a rich client application-you will need to write your own test runner application as well.
17-
18-
19-
6+
The difference with JUnit Plug-in s is in how they are executed.
7+
Instead of using the standard JUnit class TestRunner, JUnit Plug-in tests are executed by a special test runner that launches another Eclipse instance in a separate VM-just like a runtime workbench-and executes the test methods within that workbench.
8+
This means your tests can call Eclipse Platform API, along with methods from your own plug-in, to exercise the functionality you want to test.
209

10+
JUnit Plug-in tests are launched by selecting your test class and pressing **Run > Run As > JUnit Plug-in Test**.
11+
On the **Arguments** tab of the launch configuration dialog, you can choose what Eclipse application will be used to run your tests.
12+
By default, the Eclipse IDE workbench is used.
13+
If you are not testing user-interface components, you can choose **\[No Application\] - Headless Mode**.
14+
If you have written your own Eclipse application-such as a rich client application-you will need to write your own test runner application as well.
2115

2216

2317

docs/FAQ/The_Official_Eclipse_FAQs.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -146,7 +146,7 @@ This chapter describes the mechanics of plug-in development, such as creating pl
146146
* [FAQ How do I add images and other resources to a runtime JAR file?](./FAQ_How_do_I_add_images_and_other_resources_to_a_runtime_JAR_file.md "FAQ How do I add images and other resources to a runtime JAR file?")
147147
* [FAQ Can I add icons declared by my plugin.xml in the runtime JAR?](./FAQ_Can_I_add_icons_declared_by_my_plugin_xml_in_the_runtime_JAR.md "FAQ Can I add icons declared by my plugin.xml in the runtime JAR?")
148148
* [FAQ When does PDE change a plug-in's Java build path?](./FAQ_When_does_PDE_change_a_plug-ins_Java_build_path.md "FAQ When does PDE change a plug-in's Java build path?")
149-
* [FAQ What is a PDE JUnit test?](./FAQ_What_is_a_PDE_JUnit_test.md "FAQ What is a PDE JUnit test?")
149+
* [FAQ What is a JUnit Plug-in testt?](./FAQ_What_is_a_PDE_JUnit_test.md "FAQ What is a JUnit Plug-in test?")
150150
* [FAQ Where can I find the Eclipse plug-ins?](./FAQ_Where_can_I_find_the_Eclipse_plug-ins.md "FAQ Where can I find the Eclipse plug-ins?")
151151
* [FAQ How do I find a particular class from an Eclipse plug-in?](./FAQ_How_do_I_find_a_particular_class_from_an_Eclipse_plug-in.md "FAQ How do I find a particular class from an Eclipse plug-in?")
152152
* [FAQ Why do I get a 'plug-in was unable to load class' error when I activate a menu or toolbar action?](./FAQ_Why_do_I_get_a_plug-in_was_unable_to_load_class_error_when_I_activate_a_menu_or_toolbar_action.md "FAQ Why do I get a 'plug-in was unable to load class' error when I activate a menu or toolbar action?")

0 commit comments

Comments
 (0)