Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » SWTBot » PDE support for running tests in a separate thread
PDE support for running tests in a separate thread [message #12136] Sat, 03 January 2009 01:58 Go to next message
Will Horn is currently offline Will Horn
Messages: 265
Registered: July 2009
Senior Member
It is clear to me that UI tests should be run in a non-UI thread and I
am happy to see that SWTBot supports this. However, it seems to be
essentially a workaround to this PDE bug
https://bugs.eclipse.org/bugs/show_bug.cgi?id=89044

Is there any interest or ongoing effort to make this part of PDE? To me
it is a no-brainer that PDE should support it.

What particularly interests me about adding this to PDE is the ability
to run SWTBot tests without installing SWTBot into the IDE (i.e. just
having it part of the target platform). Not to mention this would make
the net.sf.swtbot.eclipse.ui and all its copied code no longer necessary.

Will
Re: PDE support for running tests in a separate thread [message #12148 is a reply to message #12136] Sat, 03 January 2009 05:03 Go to previous messageGo to next message
Ketan Padegaonkar is currently offline Ketan Padegaonkar
Messages: 873
Registered: July 2009
Senior Member
<<Copying to the PDE newsgroup>>

Thanks for pointing out this bug. I'd definitely want to push this to
become a of PDE.

The fix itself is quite trivial as you mention. I've added a few
comments on the bug, please add yourself to cc, and the conversation
could be taken to the bugzilla.

-- Ketan

On 3/1/09 07:28, Will Horn wrote:
> It is clear to me that UI tests should be run in a non-UI thread and I
> am happy to see that SWTBot supports this. However, it seems to be
> essentially a workaround to this PDE bug
> https://bugs.eclipse.org/bugs/show_bug.cgi?id=89044
>
> Is there any interest or ongoing effort to make this part of PDE? To me
> it is a no-brainer that PDE should support it.
>
> What particularly interests me about adding this to PDE is the ability
> to run SWTBot tests without installing SWTBot into the IDE (i.e. just
> having it part of the target platform). Not to mention this would make
> the net.sf.swtbot.eclipse.ui and all its copied code no longer necessary.
>
> Will
Re: PDE support for running tests in a separate thread [message #36244 is a reply to message #12148] Fri, 22 May 2009 14:04 Go to previous messageGo to next message
Eclipse User
Originally posted by: jlp.maconomy.com

I noticed that the PDE fix was made for 3.5M5. Does the newest version
of SWTBOT depend on this fix being available? The reason I ask is that I
just installed version 2.0.0.316-dev. Launching that from Eclipse 3.4
seems to force SWTBOT to run on the UI thread. The other team members in
my team experience that SWTBOT does NOT run on the UI thread - they are
using version 2.0.0.204-dev.

-- Jakob.
Re: PDE support for running tests in a separate thread [message #36276 is a reply to message #36244] Fri, 22 May 2009 14:05 Go to previous messageGo to next message
Ketan Padegaonkar is currently offline Ketan Padegaonkar
Messages: 873
Registered: July 2009
Senior Member
You need to run the tests SWTBot tests not PDE-junit tests.

-- Ketan

On 22/5/09 19:34, Jakob Lyng Petersen wrote:
> I noticed that the PDE fix was made for 3.5M5. Does the newest version
> of SWTBOT depend on this fix being available? The reason I ask is that I
> just installed version 2.0.0.316-dev. Launching that from Eclipse 3.4
> seems to force SWTBOT to run on the UI thread. The other team members in
> my team experience that SWTBOT does NOT run on the UI thread - they are
> using version 2.0.0.204-dev.
>
> -- Jakob.
Re: PDE support for running tests in a separate thread [message #36309 is a reply to message #36276] Fri, 22 May 2009 14:33 Go to previous messageGo to next message
Eclipse User
Originally posted by: jlp.maconomy.com

Hi Ketan,

Yeah, I do that, actually. So, are there any other explanations why it
looks like my tests are run on the UI thread?

Jakob.

Ketan Padegaonkar wrote:
> You need to run the tests SWTBot tests not PDE-junit tests.
>
> -- Ketan
>
> On 22/5/09 19:34, Jakob Lyng Petersen wrote:
>> I noticed that the PDE fix was made for 3.5M5. Does the newest version
>> of SWTBOT depend on this fix being available? The reason I ask is that I
>> just installed version 2.0.0.316-dev. Launching that from Eclipse 3.4
>> seems to force SWTBOT to run on the UI thread. The other team members in
>> my team experience that SWTBOT does NOT run on the UI thread - they are
>> using version 2.0.0.204-dev.
>>
>> -- Jakob.
>
Re: PDE support for running tests in a separate thread [message #36341 is a reply to message #36309] Fri, 22 May 2009 16:03 Go to previous messageGo to next message
Ketan Padegaonkar is currently offline Ketan Padegaonkar
Messages: 873
Registered: July 2009
Senior Member
Does Display.getDefault() inside the test give you a non-null value ?

-- Ketan

On 22/5/09 20:03, Jakob Lyng Petersen wrote:
> Hi Ketan,
>
> Yeah, I do that, actually. So, are there any other explanations why it
> looks like my tests are run on the UI thread?
>
> Jakob.
>
> Ketan Padegaonkar wrote:
>> You need to run the tests SWTBot tests not PDE-junit tests.
>>
>> -- Ketan
>>
>> On 22/5/09 19:34, Jakob Lyng Petersen wrote:
>>> I noticed that the PDE fix was made for 3.5M5. Does the newest version
>>> of SWTBOT depend on this fix being available? The reason I ask is that I
>>> just installed version 2.0.0.316-dev. Launching that from Eclipse 3.4
>>> seems to force SWTBOT to run on the UI thread. The other team members in
>>> my team experience that SWTBOT does NOT run on the UI thread - they are
>>> using version 2.0.0.204-dev.
>>>
>>> -- Jakob.
>>
Re: PDE support for running tests in a separate thread [message #36620 is a reply to message #36341] Mon, 25 May 2009 07:04 Go to previous messageGo to next message
Eclipse User
Originally posted by: jlp.maconomy.com

Yes, it returns a non-null value.
And Display.getCurrent() also returns a non-null value (meaning that the
current thread is the UI thread). (I guess getDefault() always returns a
non-null value?)

Jakob.

Ketan Padegaonkar wrote:
> Does Display.getDefault() inside the test give you a non-null value ?
>
> -- Ketan
>
> On 22/5/09 20:03, Jakob Lyng Petersen wrote:
>> Hi Ketan,
>>
>> Yeah, I do that, actually. So, are there any other explanations why it
>> looks like my tests are run on the UI thread?
>>
>> Jakob.
>>
>> Ketan Padegaonkar wrote:
>>> You need to run the tests SWTBot tests not PDE-junit tests.
>>>
>>> -- Ketan
>>>
>>> On 22/5/09 19:34, Jakob Lyng Petersen wrote:
>>>> I noticed that the PDE fix was made for 3.5M5. Does the newest version
>>>> of SWTBOT depend on this fix being available? The reason I ask is
>>>> that I
>>>> just installed version 2.0.0.316-dev. Launching that from Eclipse 3.4
>>>> seems to force SWTBOT to run on the UI thread. The other team
>>>> members in
>>>> my team experience that SWTBOT does NOT run on the UI thread - they are
>>>> using version 2.0.0.204-dev.
>>>>
>>>> -- Jakob.
>>>
>
Re: PDE support for running tests in a separate thread [message #36654 is a reply to message #36620] Mon, 25 May 2009 07:37 Go to previous messageGo to next message
Eclipse User
Originally posted by: jlp.maconomy.com

Actually, I found the work-around in another thread in this newsgroup:

You have to add the following command-line argument to the
runtime-configuration (even if it runs as an SWTBot Test):
-application org.eclipse.swtbot.eclipse.core.swtbottestapplication

(see the tread "New SWTBot Release"(

--Jakob.

Jakob Lyng Petersen wrote:
> Yes, it returns a non-null value.
> And Display.getCurrent() also returns a non-null value (meaning that the
> current thread is the UI thread). (I guess getDefault() always returns a
> non-null value?)
>
> Jakob.
>
> Ketan Padegaonkar wrote:
>> Does Display.getDefault() inside the test give you a non-null value ?
>>
>> -- Ketan
>>
>> On 22/5/09 20:03, Jakob Lyng Petersen wrote:
>>> Hi Ketan,
>>>
>>> Yeah, I do that, actually. So, are there any other explanations why it
>>> looks like my tests are run on the UI thread?
>>>
>>> Jakob.
>>>
>>> Ketan Padegaonkar wrote:
>>>> You need to run the tests SWTBot tests not PDE-junit tests.
>>>>
>>>> -- Ketan
>>>>
>>>> On 22/5/09 19:34, Jakob Lyng Petersen wrote:
>>>>> I noticed that the PDE fix was made for 3.5M5. Does the newest version
>>>>> of SWTBOT depend on this fix being available? The reason I ask is
>>>>> that I
>>>>> just installed version 2.0.0.316-dev. Launching that from Eclipse 3.4
>>>>> seems to force SWTBOT to run on the UI thread. The other team
>>>>> members in
>>>>> my team experience that SWTBOT does NOT run on the UI thread - they
>>>>> are
>>>>> using version 2.0.0.204-dev.
>>>>>
>>>>> -- Jakob.
>>>>
>>
Re: PDE support for running tests in a separate thread [message #36722 is a reply to message #36654] Mon, 25 May 2009 10:13 Go to previous messageGo to next message
Ketan Padegaonkar is currently offline Ketan Padegaonkar
Messages: 873
Registered: July 2009
Senior Member
I've fixed this in the latest build available on the update site.

-- Ketan

On 25/5/09 13:07, Jakob Lyng Petersen wrote:
> Actually, I found the work-around in another thread in this newsgroup:
>
> You have to add the following command-line argument to the
> runtime-configuration (even if it runs as an SWTBot Test):
> -application org.eclipse.swtbot.eclipse.core.swtbottestapplication
>
> (see the tread "New SWTBot Release"(
>
> --Jakob.
>
> Jakob Lyng Petersen wrote:
>> Yes, it returns a non-null value.
>> And Display.getCurrent() also returns a non-null value (meaning that
>> the current thread is the UI thread). (I guess getDefault() always
>> returns a non-null value?)
>>
>> Jakob.
>>
>> Ketan Padegaonkar wrote:
>>> Does Display.getDefault() inside the test give you a non-null value ?
>>>
>>> -- Ketan
>>>
>>> On 22/5/09 20:03, Jakob Lyng Petersen wrote:
>>>> Hi Ketan,
>>>>
>>>> Yeah, I do that, actually. So, are there any other explanations why it
>>>> looks like my tests are run on the UI thread?
>>>>
>>>> Jakob.
>>>>
>>>> Ketan Padegaonkar wrote:
>>>>> You need to run the tests SWTBot tests not PDE-junit tests.
>>>>>
>>>>> -- Ketan
>>>>>
>>>>> On 22/5/09 19:34, Jakob Lyng Petersen wrote:
>>>>>> I noticed that the PDE fix was made for 3.5M5. Does the newest
>>>>>> version
>>>>>> of SWTBOT depend on this fix being available? The reason I ask is
>>>>>> that I
>>>>>> just installed version 2.0.0.316-dev. Launching that from Eclipse 3.4
>>>>>> seems to force SWTBOT to run on the UI thread. The other team
>>>>>> members in
>>>>>> my team experience that SWTBOT does NOT run on the UI thread -
>>>>>> they are
>>>>>> using version 2.0.0.204-dev.
>>>>>>
>>>>>> -- Jakob.
>>>>>
>>>
Re: PDE support for running tests in a separate thread [message #36756 is a reply to message #36654] Mon, 25 May 2009 10:13 Go to previous message
Ketan Padegaonkar is currently offline Ketan Padegaonkar
Messages: 873
Registered: July 2009
Senior Member
I've fixed this in the latest build available on the update site.

-- Ketan

On 25/5/09 13:07, Jakob Lyng Petersen wrote:
> Actually, I found the work-around in another thread in this newsgroup:
>
> You have to add the following command-line argument to the
> runtime-configuration (even if it runs as an SWTBot Test):
> -application org.eclipse.swtbot.eclipse.core.swtbottestapplication
>
> (see the tread "New SWTBot Release"(
>
> --Jakob.
>
> Jakob Lyng Petersen wrote:
>> Yes, it returns a non-null value.
>> And Display.getCurrent() also returns a non-null value (meaning that
>> the current thread is the UI thread). (I guess getDefault() always
>> returns a non-null value?)
>>
>> Jakob.
>>
>> Ketan Padegaonkar wrote:
>>> Does Display.getDefault() inside the test give you a non-null value ?
>>>
>>> -- Ketan
>>>
>>> On 22/5/09 20:03, Jakob Lyng Petersen wrote:
>>>> Hi Ketan,
>>>>
>>>> Yeah, I do that, actually. So, are there any other explanations why it
>>>> looks like my tests are run on the UI thread?
>>>>
>>>> Jakob.
>>>>
>>>> Ketan Padegaonkar wrote:
>>>>> You need to run the tests SWTBot tests not PDE-junit tests.
>>>>>
>>>>> -- Ketan
>>>>>
>>>>> On 22/5/09 19:34, Jakob Lyng Petersen wrote:
>>>>>> I noticed that the PDE fix was made for 3.5M5. Does the newest
>>>>>> version
>>>>>> of SWTBOT depend on this fix being available? The reason I ask is
>>>>>> that I
>>>>>> just installed version 2.0.0.316-dev. Launching that from Eclipse 3.4
>>>>>> seems to force SWTBOT to run on the UI thread. The other team
>>>>>> members in
>>>>>> my team experience that SWTBOT does NOT run on the UI thread -
>>>>>> they are
>>>>>> using version 2.0.0.204-dev.
>>>>>>
>>>>>> -- Jakob.
>>>>>
>>>
Previous Topic:upgrade to 2.0; some XXwithLabel cases failed
Next Topic:Running SWTBot -Tests with an complete new instance of eclipse
Goto Forum:
  


Current Time: Sat Oct 25 15:30:54 GMT 2014

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

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