|
Hi all,
I started playing with UISpec4J - tired of the problems with Abbot, and curious
about the different approach.
My first experience has not been very succesful. I converted a Junit testcase
from Abbot to UISpec4J, and the mapping from one API to the other was quite
simple. But when I run the testcase I get the following error:
1)
null(com.sas.analytics.irp.client.swing.UISpec4J_ScenarioComparisonWindowTest)ju\
nit.framework.AssertionFailedError
2)
null(com.sas.analytics.irp.client.swing.UISpec4J_ScenarioComparisonWindowTest)ju\
nit.framework.AssertionFailedError
Note how Junit itself seems to be having problems finding the method name - I
never saw this behavior before.
My next step was to build UISpec4J locally and run the testcases. I had to
change the build.xml file slightly - it still has references to a local drive
(d:/...) which was easily solved by replacing those references with ${basedir}.
The second problem was the use of <get> to retrieve dependencies - since I am
behind a firewall, I had to add a call to <setproxy> to the build.xml file.
After making those changes, I was able to run Ant and Maven. Everything seems to
be fine, with the exception of two test cases that failed, and some deprecation
warnings (see below). But I still don't know how to fix the Junit problem in my
own testcases....
Regards,
Nascif
PS: Regis, your name sounds Brazillian to me. Are you from Brazil by any chance?
Eu sou de Minas, mas estou trabalhando na Carolina do Norte.
RadioButtonTest
testClickTakesLessTimeThanWithDefaultSwingCalls 0.02
Maximum elapsed time reached: 16 >= 10
WindowInterceptorTest
testTimeoutDuringInterceptionOfANonModalDialog 0.14
expected:<No window was shown> but was:<The shown window is modal, it must be
intercepted with a WindowHandler>
compile:
[javac] Compiling 81 source files to
C:\home\src\uispec4j-0.11\target\classes
[javac]
C:\home\src\uispec4j-0.11\src\java\org\uispec4j\interception\ToolkitDelegate.jav\
a:122: warning: getFontList() in java.awt.Toolkit has been deprecated
[javac] public String[] getFontList() {
[javac] ^
[javac]
C:\home\src\uispec4j-0.11\src\java\org\uispec4j\interception\ToolkitDelegate.jav\
a:123: warning: getFontList() in java.awt.Toolkit has been deprecated
[javac] return getUnderlyingToolkit().getFontList();
[javac] ^
[javac]
C:\home\src\uispec4j-0.11\src\java\org\uispec4j\interception\ToolkitDelegate.jav\
a:126: warning: getFontMetrics(java.awt.Font) in java.awt.Toolkit has been
deprecated
[javac] public FontMetrics getFontMetrics(Font font) {
[javac] ^
[javac]
C:\home\src\uispec4j-0.11\src\java\org\uispec4j\interception\ToolkitDelegate.jav\
a:127: warning: getFontMetrics(java.awt.Font) in java.awt.Toolkit has been
deprecated
[javac] return getUnderlyingToolkit().getFontMetrics(font);
[javac] ^
[javac]
C:\home\src\uispec4j-0.11\src\java\org\uispec4j\interception\ToolkitDelegate.jav\
a:206: warning: getFontPeer(java.lang.String,int) in java.awt.Toolkit has been
deprecated
[javac] public FontPeer getFontPeer(String name, int style) {
[javac] ^
[javac] 5 warnings
|