Skip to main content

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:


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 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=""/>
<property name="plugin-name" value=""/>
<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">
<fileset dir="${eclipse-home}" includes="${plugin-name}.xml"/>

<target name="suite">

<property name="jvmOption" value=""/>

<property name="workspace" value="gui-testing-workspace"/>

<ant target="swtbot-test" antfile="${library-file}"
<property name="os" value="linux"/>
<property name="ws" value="gtk"/>
<property name="arch" value="x86"/>
<property name="data-dir" value="${workspace}"/>
<property name="testApplication"
<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}"/>

<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"/>


I end up with:

[echo] ======================================
[echo] Running swtbot junit tests in
[echo] Command line args are -application
org.eclipse.swtbot.eclipse.junit4.headless.swtbottestapplica tion
-testApplication org.eclipse.ui.ide.workbench -data
gui-testing-workspace nitResultFormatter,/opt/galileo/ xml JUnitResultFormatter
-testPluginName -className -os linux -ws gtk -arch x86
-consoleLog -debug
[echo] JVM args are -Xms128M -Xmx368M -XX:MaxPermSize=256M
[echo] JUnit Result File:
[echo] Console output File:
[echo] ======================================
[java] (<unknown>:26317): GLib-WARNING **: g_set_prgname() called
multiple times
[java] java.lang.Exception: Could not find plugin
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 ""

Seems you are missing (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: Wed May 23 19:00:48 GMT 2018

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

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

Back to the top