Running SWTBot headless [message #505201] |
Mon, 28 December 2009 14:47 |
Eclipse User |
|
|
|
Originally posted by: me.no.spam
Hello,
I have noticed other people posting here about similar problems but I
cannot find an answer. Can you give an advice what is wrong with the
following set up?
I followed the User Guide to run simple tests (which didn't quite go as
described, e.g., I have no package org.apache.commons.collections, but I
did get the test run from Eclipse.) So far all is good.
Then I tried to run this same test (which doesn't do really do anything,
but that is not the issue here) by following the "Executing SWTBot Tests
from Ant". I exported the plugin project from the 1st step into
/opt/galileo/plugins (from which you can see that I am using Galileo) as
org.foo.bar.testing.jar. The build.xml is:
<?xml version="1.0" encoding="UTF-8" ?>
<project name="testsuite" default="run" basedir=".">
<property name="eclipse-home" value="/opt/galileo"/>
<property name="all.buildId" value="2.0.0.433-dev-e35"/>
<property name="plugin-name" value="org.foo.bar.testing"/>
<property name="test-class" value="Scratch"/>
<property name="library-file"
value=" ${eclipse-home}/plugins/org.eclipse.swtbot.eclipse.junit4.he adless_${all.buildId}/library.xml "/>
<target name="init">
<tstamp/>
<delete>
<fileset dir="${eclipse-home}" includes="${plugin-name}.xml"/>
</delete>
</target>
<target name="suite">
<property name="jvmOption" value=""/>
<property name="workspace" value="gui-testing-workspace"/>
<ant target="swtbot-test" antfile="${library-file}"
dir="/home/jlahtin/Eclipse/gui-testing-workspace">
<property name="os" value="linux"/>
<property name="ws" value="gtk"/>
<property name="arch" value="x86"/>
<property name="data-dir" value="${workspace}"/>
<property name="testApplication"
value="org.eclipse.ui.ide.workbench"/>
<property name="plugin-name" value="${plugin-name}"/>
<property name="classname" value="${plugin-name}.${test-class}"/>
<property name="product" value="testProduct"/>
<property name="vmargs" value=" -Xms128M -Xmx368M
-XX:MaxPermSize=256M ${jvmOption}"/>
</ant>
</target>
<target name="run" depends="init,suite">
<ant target="collect" antfile="${library-file}" dir="dump">
<property name="includes" value="*.xml"/>
<property name="output-file" value="${plugin-name}.xml"/>
</ant>
</target>
</project>
I end up with:
....
java-test:
[echo] ======================================
[echo] Running swtbot junit tests in org.foo.bar.testing.Scratch
[echo] Command line args are -application
org.eclipse.swtbot.eclipse.junit4.headless.swtbottestapplica tion
-testApplication org.eclipse.ui.ide.workbench -data
gui-testing-workspace
formatter=org.apache.tools.ant.taskdefs.optional.junit.XMLJU nitResultFormatter,/opt/galileo/org.foo.bar.testing.Scratch. xml
formatter=org.apache.tools.ant.taskdefs.optional.junit.Plain JUnitResultFormatter
-testPluginName org.foo.bar.testing -className
org.foo.bar.testing.Scratch -os linux -ws gtk -arch x86
-consoleLog -debug
[echo] JVM args are -Xms128M -Xmx368M -XX:MaxPermSize=256M
[echo] JUnit Result File:
/opt/galileo/results/org.foo.bar.testing.Scratch.xml.
[echo] Console output File:
/opt/galileo/results/org.foo.bar.testing.Scratch.txt.
[echo] ======================================
[java]
[java] (<unknown>:26317): GLib-WARNING **: g_set_prgname() called
multiple times
[java] java.lang.Exception: Could not find plugin
"org.foo.bar.testing"
...
|
|
|
|
|
|
Powered by
FUDForum. Page generated in 0.04149 seconds