Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » SWTBot » Problems running headless under Xvnc
Problems running headless under Xvnc [message #539698] Fri, 11 June 2010 21:44 Go to next message
Jeff Johnston is currently offline Jeff JohnstonFriend
Messages: 215
Registered: July 2009
Senior Member
I have SWTBot tests that run fine headless on my F-12 system. I have the same tests set up to run in a Hudson instance under Xvnc on another machine (there is an exec that sets up everything). The tests fail; often right off the start in my beforeClass method. I am getting a missing widget when I try to access the Window->Preferences menu.

There are some screenshots that I got and in them, the main Eclipse window was not shown to be active (i.e. the title bar was grey). Is it possible that this is the cause of my problems?

The following is the start of my beforeClass method:

	public static void beforeClass() throws Exception {
		SWTBotPreferences.KEYBOARD_LAYOUT = "EN_US";
		bot = new SWTWorkbenchBot();
		// Close the Welcome view if it exists
		try {
		bot.viewByTitle("Welcome").close();
		} catch (Exception e) {
			// do nothing
		}
		bot.menu("Window").menu("Preferences").click();


The widget not found is generated for the last line above.

Is there something I must do to ensure that the main Eclipse window is in focus?
Re: Problems running headless under Xvnc [message #539699 is a reply to message #539698] Fri, 11 June 2010 21:54 Go to previous messageGo to next message
Jeff Johnston is currently offline Jeff JohnstonFriend
Messages: 215
Registered: July 2009
Senior Member
I should mention that I am using SWTBot 568-e36 and Eclipse Helios RC4. The same set of tests runs under Hudson with Galileo and a previous version of SWTBot.
Re: Problems running headless under Xvnc [message #540390 is a reply to message #539698] Wed, 16 June 2010 00:08 Go to previous messageGo to next message
Ketan Padegaonkar is currently offline Ketan PadegaonkarFriend
Messages: 873
Registered: July 2009
Senior Member
A simple way to verify the VNC setup is if the failure screenshots
contain windows with titlebars. If the failure screenshots don't contain
a titlebar then there's something wrong with your setup.

Could you verify that your setup is as described here ?

http://wiki.eclipse.org/SWTBot/CI_Server

-- Ketan
http://ketan.padegaonkar.name | http://eclipse.org/swtbot

On 6/11/10 2:44 PM, Jeff Johnston wrote:
> I have SWTBot tests that run fine headless on my F-12 system. I have
> the same tests set up to run in a Hudson instance under Xvnc on another
> machine (there is an exec that sets up everything). The tests fail;
> often right off the start in my beforeClass method. I am getting a
> missing widget when I try to access the Window->Preferences menu.
>
> There are some screenshots that I got and in them, the main Eclipse
> window was not shown to be active (i.e. the title bar was grey). Is it
> possible that this is the cause of my problems?
>
> The following is the start of my beforeClass method:
>
>
> public static void beforeClass() throws Exception {
> SWTBotPreferences.KEYBOARD_LAYOUT = "EN_US";
> bot = new SWTWorkbenchBot();
> // Close the Welcome view if it exists
> try {
> bot.viewByTitle("Welcome").close();
> } catch (Exception e) {
> // do nothing
> }
> bot.menu("Window").menu("Preferences").click();
>
>
> The widget not found is generated for the last line above.
>
> Is there something I must do to ensure that the main Eclipse window is
> in focus?
Re: Problems running headless under Xvnc [message #540988 is a reply to message #540390] Thu, 17 June 2010 21:31 Go to previous message
Jeff Johnston is currently offline Jeff JohnstonFriend
Messages: 215
Registered: July 2009
Senior Member
Thanks for the pointer, it is good to know.

I found the problem. My script for Galileo doesn't work for Helios under XVnc, though it manages to work on my local system being run from the command line. I found that Eclipse can't find the SWTBot headless application, though the proper plugin is in the plugins folder. This is due to me using plugins rather than dropins. I guess it sort of works sometimes when in the plugins folder. Switching to using the dropins folder turned out to be the way to go.
Previous Topic:expand section with swtbot
Next Topic:Simulate the enter key
Goto Forum:
  


Current Time: Fri Apr 19 09:15:23 GMT 2024

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

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

Back to the top