| headless swtbot does not find testproject [message #495908] |
Fri, 06 November 2009 10:31  |
Sandor Szuecs Messages: 2 Registered: November 2009 |
Junior Member |
|
|
I tested on Mac OS X and on windows. Both tests works when I start them from inside Eclipse, not from CLI (or Ant).
To test in Eclipse I start org.eclipsecon.swtbot.example.AllTests as swtbot Test.
I followed the headless screencast and http://wiki.eclipse.org/SWTBot/Ant#Executing, but I don't really understand why.
On OSX it crashes with a SIGTRAP caused bylibswt-cocoa-carbon-3452.jnilib, I think that's maybe a problem from Apple's implementation.
On windows I get an error that the Test class was not found [1].
The commands I used on windows:
set ECLIPSE_HOME=D:\eclipse_saros
set TEST_CLASS=org.eclipsecon.swtbot.example.AllTests
set CLASSPATH=%ECLIPSE_HOME%\plugins\org.eclipse.equinox.launche r_1.0.101.R34x_v20081125.jar;D:\tmp\foo_workspace\org.eclips econ.swtbot.example\bin;%ECLIPSE_HOME%\plugins\org.eclipseco n.swtbot.example_1.0.0.jar
java -Xms256M -Xmx256M -XX:MaxPermSize=128M -DPLUGIN_PATH=D:\eclipse_saros\plugins -classpath %ECLIPSE_HOME%\plugins\org.eclipse.equinox.launcher_1.0.101. R34x_v20081125.jar;bin org.eclipse.core.launcher.Main -application org.eclipse.swtbot.eclipse.junit4.headless.swtbottestapplica tion -data workspace formatter=org.apache.tools.ant.taskdefs.optional.junit.XMLJU nitResultFormatter,%ECLIPSE_HOME%/%TEST_CLASS%.xml formatter=org.apache.tools.ant.taskdefs.optional.junit.Plain JUnitResultFormatter -testPluginName de.fu_berlin.inf.dpp -className %TEST_CLASS% -arch x86 -consoleLog -debug
[1] Class not found "org.eclipsecon.swtbot.example.AllTests"
Exception in thread "WorkbenchTestable" java.lang.ClassCastException: org.apache
.tools.ant.taskdefs.optional.junit.XMLJUnitResultFormatter cannot be cast to jun
it.framework.TestListener
at org.eclipse.swtbot.eclipse.junit4.headless.EclipseTestRunner .run(Ecli
pseTestRunner.java:331)
at org.eclipse.swtbot.eclipse.junit4.headless.EclipseTestRunner .run(Ecli
pseTestRunner.java:208)
at org.eclipse.swtbot.eclipse.junit4.headless.UITestApplication .runTests
(UITestApplication.java:115)
at org.eclipse.ui.internal.testing.WorkbenchTestable$1.run(Work benchTest
able.java:68)
at java.lang.Thread.run(Unknown Source)
I hope you can help me, thanks
Sandor.
|
|
|