It would be nice if the SWTBot tests are upgraded to JUnit 4 so that everyone
can simply copy, paste and modify what he needs. It would be good for learning.
As it seems you run the UI in the tests on a different thread. But you use some
non public methods for it. In the class Setup you have a method called
createUIThread(...)
Its a bit complicated to understand how that works. If someone wants to write a
SWTBot test he is confused because the test maybe starts his client but then
freezes. He then has to wonder and examine how to run the UI on another thread.
He cannot use your method in Setup class for it. And he cannot start the test
with "SWTBot Test" launcher since this is only for RCP clients.
There are different solutions. One is to override runBare() and to include the
logic there to run the test in a different thread. This is how Abbot does it.
But this requires to extend from a JUnit class hierarchy. And in JUnit 4 there
is no class hierarchy, you just annotate a method with @Test. So SWTBotTestCase
does not fit in the JUnit 4 concept at all with its extension from TestCase.
Another solution would be a helper method which starts the client in another
thread, a method where a runnable is passed which starts the client.
What do you think?
--- On Thu, 10/9/08, Ketan Padegaonkar <[EMAIL PROTECTED]> wrote:
From: Ketan Padegaonkar <[EMAIL PROTECTED]>
Subject: Re: [SWTBot-users] [ANN] SWTBot 2.0 alpha available.
To: swtbot-users@lists.sourceforge.net
Date: Thursday, October 9, 2008, 2:31 PM
On 09-Oct-08, at 11:59 PM, Hans Schwaebli wrote:
> Will you upgrade to JUnit 4 also? Would be nice.
SWTBot is independent of Junit, so technically it should work :)
If you're talking about PDE support for SWTBot, that's hard. I'm
not
sure if PDE supports junit 4. I'll be pushing for this in eclipse 3.5,
though.
-- Ketan
-------------------------------------------------------------------------
This SF.Net email is sponsored by the Moblin Your Move Developer's
challenge
Build the coolest Linux based applications with Moblin SDK & win great
prizes
Grand prize is a trip for two to an Open Source event anywhere in the world
http://moblin-contest.org/redirect.php?banner_id=100&url=/
_______________________________________________
SWTBot-users mailing list
SWTBot-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/swtbot-users
http://swtbot.org/ - a functional testing tool for SWT/Eclipse
-------------------------------------------------------------------------
This SF.Net email is sponsored by the Moblin Your Move Developer's challenge
Build the coolest Linux based applications with Moblin SDK & win great prizes
Grand prize is a trip for two to an Open Source event anywhere in the world
http://moblin-contest.org/redirect.php?banner_id=100&url=/
_______________________________________________
SWTBot-users mailing list
SWTBot-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/swtbot-users
http://swtbot.org/ - a functional testing tool for SWT/Eclipse