Modify your Java profile settings accordingly
before importing JUnit 4.x module tests.
-
Select
.
The
Import Unit Test - JUnit Test Class dialog opens.
-
Cick the Advanced Settings button (the funnel icon above the Methods area).
The Advanced Settings dialog opens.
-
Perform the following steps:
-
Uncheck the Unit Test Functions Only check box.
-
Check the Declared Functions Only check box.
-
Uncheck the Member Functions Only check box.
-
Click OK.
-
In the
File field, specify the archive that is to be tested.
The archive is automatically added to the profile classpath. The available classes are then retrieved and displayed, sorted
alphabetically in the
Class field.
-
From the
Class list, select one of the available classes for testing.
When you do not specify a specific archive for testing, the wizard enables you to specify a class that is available in the
profile classpath. Type the fully qualified class name into the
Class field, for example
java.lang.String.
The available constructors and methods are automatically retrieved and displayed.
-
From the
Constructor list, select the appropriate constructor for instantiating the imported class.
If a constructor is not selected (entry
<No Instance Required – Only Static Calls>), only static methods will be displayed in the method list.
-
In the Methods area, select the suite() method, then click OK.