|
This installation guide describes how you install and configure the
jfcUnit Eclipse Plugin both on your terminal server accounts and on your
private computers.
Installation on your own computer
- Install the Eclipse IDE by downloading it from the
Eclipse downloads home (make
sure you have installed the J2SE Development Kit 5.0 from Sun).
- Unzip the downloaded Eclipse ZIP file to a desired location on your
personal computer, e.g.
c:\ and Eclipse can be found in the path c:\eclipse, from now on refered to as ECLIPSE_HOME.
- Download the
jfcUnit
Eclipse Plugin (
jfcunit_Eclipse_plugin_2.08.zip) from the jfcUnit web page and extract it to the ECLIPSE_HOME\plugins directory.
- Copy the
jfcunit.jar and the jakarta-regexp-1.2.jar located in the ECLIPSE_HOME\plugins\junit.extensions.jfcunit folder to the ECLIPSE_HOME\plugins\org.junit_3.8.1 folder.
- Start Eclipse by running the
ECLIPSE_HOME\eclipse.exe file.
- Declare a location were you want your Eclipse projects stored, e.g.
at your home directory at the student server by creating a new directory called
workspace. Check the "Use this as the default and do not ask again" if
you do want to be asked about this again.

- Select "File -> New -> Project -> Java Project" and
click "Next". Declare a project name, e.g. "TDT4180_Ovinger".
Make sure the JDK Compliance is set to "5.0" and select the "Create
separate source and output folders" option in the "Project layout"
pane. Click the "Finish" button.

- Right-click on your project (e.g. "TDT4180_Ovinger") in the
"Package Explorer" area and select "New -> Source Folder". Name the new
folder "tests" and click "Finish". This folder is were you should
put the jfcUnit tests attached to the exercises.

- Create sub-folders/packages of your src and tests
folders in order to separate the different exercises. This is done by
right-clicking the src folder and select "New -> Folder" and
name it e.g. oving1. Repeat this for the tests folder. For the
exercises T2, T3 and T4 you repeat this part and name the sub-folders/packages
oving2, oving3 and oving4 respectively.
- Download the test attached to exercise 1 to your Desktop (copy the
name of the file, right click the link, select Save Link As... and
declare the name of the test (for the first exercise the test is named
ButtonsNTextTest.java))and drag it into the tests/oving1 folder. This operation can be
repeated for future exercises as well to corresponding folders.
- In order to make your Eclipse environment work , you have to add the
jUnit and jfcUnit libraries to your project. This can be done in
the following way:
- Open the test by double-clicking it. The test appears with a red
square with a white X depicting that there are errors. Press "Ctrl + ."
(the Ctrl-key and the period-key) to navigate to the first error and press
"Ctrl + 1" for Quick Fix options. Select the option "Add JUnit libraries"
- The Quick Fix feature would not help us in order to add the
jfcUnit libraries. This has to be done in a different way. Right-click the
project (e.g. TDT4180_Ovinger in the Package Explorer area) and select
Properties. Select the Libraries tab. Click the button "Add Variable..." and
select JUNIT_HOME and click "Extend...". Select the
jakarta-regexp-1.2.jar and the jfcunit.jar files and click "OK". Finally, click "Apply" and you are
done.

- You should now be ready to start implementing your class(es)
according to the specifications stated in the exercise text. Create a new class
in src/oving1 folder which name is according to the requirements in the
exercise text. Do this by right-clicking the src/oving1 folder and
select "New -> Class", declare the correct class name, superclasses
and interfaces and start implementing.

- To run the test cases, simply right-click the test class in the
Package Explorer area and select "Run As -> JUnit Test"
Installation on the student terminal server
Do the action points 5-12 described above.
Do you need help? Please send an email to
tdt4180-studass at
idi.ntnu.no.
|