Running the Tests
Ideally, nothing special would need to be done in order to successfully run the Functional unit tests from Eclipse. Unfortunately, there are some platform-specific issues which need to be dealt with in order to guarantee a successful test run. Please read below for more information.
Platform Specific Notes
Linux
- Right click on fluency from the Project Explorer. Click Run As -> Run Configuration.
- In the left Panel of the Run Configuration Window click JUnit -> Going one level down the tree, select "test"(test is the name of the run configuration).
- Click on Arguments tab in the window and paste the following line in the textbox for VM arguments: -Dawt.toolkit=sun.awt.motif.MToolkit
- The reason for the above step can be found at http://www.uispec4j.org/troubleshooting.html
- Click OK, and you should be able to run the test suite.
Windows XP
If you are using Windows XP then version 1.6.0_10 and greater of the JDK will cause errors to happen in the GUI tests. The error you will see will be something like this:
java.lang.AbstractMethodError: sun.awt.SunToolkit.isWindowTranslucencySupported()Z at com.sun.awt.AWTUtilities.isWindowTranslucencySupported(Unknown Source) at com.sun.awt.AWTUtilities.isTranslucencySupported(Unknown Source) at javax.swing.RepaintManager.updateWindows(Unknown Source) at javax.swing.RepaintManager.paintDirtyRegions(Unknown Source) at javax.swing.RepaintManager.paintDirtyRegions(Unknown Source) at javax.swing.RepaintManager.seqPaintDirtyRegions(Unknown Source) at javax.swing.SystemEventQueueUtilities$ComponentWorkRequest.run(Unknown Source) at java.awt.event.InvocationEvent.dispatch(Unknown Source) at java.awt.EventQueue.dispatchEvent(Unknown Source) at org.knownspace.fluency.editor.GUI.core.FluencyEditorFrame$FluencyEventQueue.dispatchEvent(FluencyEditorFrame.java:936)
In order to get around this error you will want to install JDK 1.6.0_05 (other versions might also work) and configure your Eclipse to use that as the default JDK.