In this section, you will create a new Java CLASS file.
1. |
In the Packages view, select the JUnit project. From the project's context menu, select New > Package. |
2. |
In the Package field, type test as the name for the new package. Then click Finish. |
3. |
In the Packages view, select the new test package and click the New Class button. |
4. |
Make sure that /JUnit appears in the Folder field and that test appears in the Package field. In the Name field, type MyTestCase. ![]() |
5. |
Click the Browse button next to the Superclass field. |
6. |
In the Choose a type field in the Superclass Selection dialog, type Test to narrow the list of available superclasses for the new class. ![]() |
7. |
Select the TestCase class and click OK. |
8. |
Check the Constructors from Superclass checkbox. |
9. |
Click Finish to create the new class. ![]() |