Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » SWTBot » Running tests on multiple client instances?
Running tests on multiple client instances? [message #32289] Tue, 14 April 2009 05:49 Go to next message
Hans Schwaebli is currently offline Hans SchwaebliFriend
Messages: 70
Registered: July 2009
Member
Does it work to run tests on more than one SUT (System Under Test)
instance?

Or will SWTBot be confused by this?

I suppose we should discern between simple SWT clients and complex RCP
clients.

RCP clients have to be started as a kind of JUnit Plug-in Test (SWTBot
Test). This implies that the SUT is started automatically before the JUnit
tests run over it. But only one instance of the SUT is started this way.
It seems not to be possible to start multiple ones.

It seem to be easier with simple SWT clients, since the tests for them are
plain JUnit tests. So you could start as many SUT instances as you like
before the test starts or while it runs. But can SWTBot handle this? Can
SWTBot click the right button on the right SUT instance for example?

Starting multiple SUT instances can be used for Load/Stress Testing. But
it also could be used for functional tests, for example testing the
locking strategy (optimistic/pessimistic). You might need a way to
synchronize the tests in the latter case.

A workaround is to run the tests in multiple VMWare instances, but that
seems to be quite heavy-weight and is not the question here.
Re: Running tests on multiple client instances? [message #32324 is a reply to message #32289] Tue, 14 April 2009 07:50 Go to previous messageGo to next message
Ketan Padegaonkar is currently offline Ketan PadegaonkarFriend
Messages: 873
Registered: July 2009
Senior Member
On 14/4/09 11:19, Hans Schwaebli wrote:
> A workaround is to run the tests in multiple VMWare instances, but that
> seems to be quite heavy-weight and is not the question here.

That is the only way of doing this at the moment, swtbot relies heavily
on the the 'active window' to find widgets. An alternative to vmware is
to run tests on multiple X servers on linux or multiple logins on
windows server.

In our case we plan on hacking the AllTest test case to pull test case
names from a central server which dispatches them to clients, and have
about 4-5 clients on each windows/linux/mac agents.

This will ensure that tests run on all platforms, and the tests are
distributed on each build machine, and run about 4-5 time faster since
we have those many machines running them.

-- Ketan
Re: Running tests on multiple client instances? [message #32359 is a reply to message #32324] Tue, 14 April 2009 09:09 Go to previous message
Hans Schwaebli is currently offline Hans SchwaebliFriend
Messages: 70
Registered: July 2009
Member
I see. But this approach (VMWare etc.) does not solve testing locking
strategy for example.

You need two clients two test locking. In one client you open a data set,
in the other client you open the same one. Then you modify the data set
and save it, but only in one client. Now try to save the data set in the
other client. If there is no error dialog saying that the data set has
been modified in the meantime elsewhere, then suggest its a bug.

Only load and stress tests can be blindly run on different machines
without synchronizing between the clients any actions.

Well, maybe there will be a solution for this in future. For example
clients run in different threads, and the active window can be searched in
different threads, so it can be discerned I think. It is not the highest
priority issue, but I think it has at least medium priority, this test
feature.
Previous Topic:Minimizing application when running tests
Next Topic:Kind of events used in SWTBot
Goto Forum:
  


Current Time: Sat Nov 29 07:46:36 GMT 2014

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

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