Creating a JUnit test manually
TPTP JUnit Tests can be created manually or as a result of
importing existing JUnit tests outside TPTP into a TPTP JUnit Test. They should
be created manually if they are to exploit the TPTP JUnit Test behavior
feature.
Note that, before creating a JUnit test, a Java project
must exist.
- Select File > New > Other.
- Expand Test. Select TPTP JUnit Test.
- Click Next to launch the New JUnit Test Definition dialog.
Identify the Source folder (javaProject/src), the Package
(junit.samples), and the name to be assigned to the JUnit Test source code
(JUnit_src).
- Click Next. The New JUnit Test Definition dialog launches.
- Enter the parent folder (javaProject/src/junit/samples) and Name (JUnit_src).
- Click Next and provide a description of the JUnit test definition.
- Click on Finish.
- The Confirm Open Editor dialog may appear (see the Window > Preferences... > Test > Open Editor preference), confirming if the new JUnit test suite is to be opened in the JUnit Test editor.
Note that the second and third pages of the wizard are optional (that is, you can finish the wizard at the first page). Also, the difference between the information requested in page 1 and page 2 is as follows: the first page asks for the name and location of the source code, while the second one asks for the name and location of the TPTP Test (the model). By default, they are identical.