PDE-JUnit tests (or SWTBot tests, for that matter) are launched within  
an RCP application, and drive the RCP app from there.

Inverting the relation over so that tests drive the lifecycle of the  
RCP application is something I've not heard of before.

In your case, the only thing I can think of is running multiple tests  
for different users, or somehow be able to switch users when the app  
is running. I'm not sure if changing users is permissible when the app  
is running, but you should be able to hack in some code for tests.

We do this in our application for license checks for e.g. Different  
kinds of licenses are provided different kind of features, and we  
manage to mock licenses when the tests are running to simulate  
something similar to what you're doing.

-- Ketan 


On 18-Aug-08, at 1:44 PM, Hans Schwaebli wrote:

> Is it possible to stop and start the RCP client under test while the  
> PDE JUnit test runs?
>
> This is needed sometimes, for example when certain tests are for  
> different users. If you have no logoff and logon feature in the  
> application, then your only chance is to restart the RCP client  
> under test in order to test something with another user.
>
> Or when a test fails one might want to reset the RCP client in order  
> to have a defined initial state for the consecutive tests. If the  
> RCP client does not provide such a feature, then a restart of the  
> client is the only option.
>
> But closing the client might *close the tests as well*, which is of  
> course bad. The tests should continue after the client is restarted.  
> Of course the best thing to use would be something like logoff and  
> logon in the client (because of performance), but if it has not that  
> feature, then it needs to be restarted. This applies both for the  
> problem, to test something with another user as well as for clean up  
> the GUI.
>
> Does someone know a solution for this? Please consider that I am  
> talking about RCP tests and not simple SWT tests and that we start  
> it as JUnit PDE tests

Cheers,
Ketan Padegaonkar,
I blog... therefore I am... http://ketan.padegaonkar.name
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

Reply via email to