Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » SWTBot » Running SWTBot headless
Running SWTBot headless [message #505201] Mon, 28 December 2009 14:47 Go to next message
Eclipse UserFriend
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"
...
Re: Running SWTBot headless [message #505747 is a reply to message #505201] Mon, 04 January 2010 18:14 Go to previous messageGo to next message
Ketan Padegaonkar is currently offline Ketan PadegaonkarFriend
Messages: 873
Registered: July 2009
Senior Member
On 12/28/09 6:47 AM, Jani Lahtinen wrote:
> [java] java.lang.Exception: Could not find plugin "org.foo.bar.testing"

Seems you are missing org.foo.bar.testing (or one of its dependencies)

-- Ketan
Re: Running SWTBot headless [message #540509 is a reply to message #505747] Wed, 16 June 2010 12:36 Go to previous messageGo to next message
Leela  is currently offline Leela Friend
Messages: 10
Registered: June 2010
Junior Member
Even I am facing same issue, Can you please let me know the solution. I have the plugin available under {Eclipse}\plugins folder.

But still its throwing exception Crying or Very Sad
Re: Running SWTBot headless [message #547630 is a reply to message #505201] Mon, 19 July 2010 08:21 Go to previous message
hintcnuie  is currently offline hintcnuie Friend
Messages: 7
Registered: July 2010
Junior Member
you can start the Eclipse and click help->about ->plug-in details to check if the plugin is installed
From my experience, if use deployable plugin jar,it will occur if put the jar twice.
Previous Topic:How to insert text into Editor (Table) ?
Next Topic:How to click a checkbox inside a tree
Goto Forum:
  


Current Time: Thu Dec 18 20:24:06 GMT 2014

Powered by FUDForum. Page generated in 0.10038 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software