9 messages in net.sourceforge.lists.swtbot-usersRe: [SWTBot-users] Tests does not con...
FromSent OnAttachments
Hans SchwaebliJun 24, 2008 12:21 am 
Ketan PadegaonkarJun 24, 2008 12:39 am 
Hans SchwaebliJun 24, 2008 1:45 am 
Ketan PadegaonkarJun 24, 2008 1:55 am 
Hans SchwaebliJun 25, 2008 12:41 am 
Ketan PadegaonkarJun 25, 2008 12:47 am 
Hans SchwaebliJun 25, 2008 1:10 am 
Hans SchwaebliJun 27, 2008 12:58 am 
Ketan PadegaonkarJun 28, 2008 12:09 am 
Actions with this message:
Paste this link in email or IM:
Paste this link in email or IM:
Atom feed for this thread
Paste this URL into your reader:
Subject:Re: [SWTBot-users] Tests does not continue after a lineActions...
From:Ketan Padegaonkar (keta@gmail.com)
Date:Jun 24, 2008 1:55:08 am
List:net.sourceforge.lists.swtbot-users

Indeed you're absolutely right :)

-- Ketan

On 24-Jun-08, at 2:15 PM, Hans Schwaebli wrote:

Okay, thank you.

The class JUnitLaunchConfigurationDelegate has a lot of compile errors on 3.2, like the other classes in the plugin.

I have very basic knowledge of writing Eclipse plugins. Maybe you copied the "JUnit Plug-in Test" plugin from Eclipse and just changed a little thing to make it run in the non-UI thread.

It seems to me that this is the central piece in the class TestApplication:

public void runTests() { fTestableObject.testingStarting(); RemotePluginTestRunner.main(Platform.getCommandLineArgs()); fTestableObject.testingFinished(); }

I will try to get the source for the Eclipse "JUnit Plug-in Test" plugin and just modify that.

Ketan Padegaonkar <keta@gmail.com> wrote: On 24-Jun-08, at 12:52 PM, Hans Schwaebli wrote:

I am writing code like this:

SWTBot bot = new SWTBot(); bot.menu("File").click(); bot.menu("Open Product Teardown...").click(); // Never returns from the above statement! bot.button("Open").click();

Unfortunately it does not execute the last statement since it is stuck in the previous for some unknown reason. This is how it looks like:

http://img70.imageshack.us/img70/8823/imageiw0.gif

I asked you about what relevance there is actually for starting RCP tests as SWTBot Test. I am starting them as JUnit Plugin Test because we need that for RCP 3.2 and the Plugin which adds "SWTBot Test" to the start menu does not work on Eclipse 3.2. Mixing Eclipse 3.3, RCP 3.2 and SWT Bot did not work. I need to be completely on

3.2.

SWTBot _has_ to run on the non-UI thread.

The reason that SWTBot is stuck on that particular dialog is that the open() method on org.eclipse.jface.window.Window() invokes #runEventLoop() which blocks the UI thread, and the tests cannot run any more.

This is _the only_ reason that SWTBot runs on a non-UI thread. Non blocking dialogs would have made life easier for SWTBot but unfortunately that's not the case.

The reason that you don't see the launch option is because the launcher uses internal API available on 3.3. If you can migrate net.sf.swtbot.eclipse.ui.JUnitLaunchConfigurationDelegate to 3.2 that would fix the issue for you.

-- Ketan