switch between two SUT

We like to switch between two SUTs in the same script.

There is a Database-Server in our company.
Now we open two SUT-connections. We will run in the first SUT an action against the Server. While this action runs on SUT1 we like now to switch to SUT2, starting an action from there. Now we switch back again to SUT1 an so on.

Is there a way other then ‘connect SUT1’ - action1 - disconnect SUT1 - connect SUT2 - action2 - disconnect SUT2 - connect SUT1 - action1b - … ?

(We prefer something like two open connection-windows and switch between this without ‘connect-disconnect-connect-disconnect’, for more speed.)

Yes, starting with Eggplant 3.3 you can do exactly this.

In your script go ahead and use the connect command to connect to another SUT. As long as you don’t explicitly use disconnect Eggplant will remain connected to the prior SUT(s). *

To switch back just issue another connect command to the first SUT.

*Note: You can override this behavior by setting the Maximum Open Connections in Eggplant Preferences->General.

Hello Jonathan

Yes, the two connections we have open here.

But ‘connect “SUTname2”’ will not bring the second window from back (behind windows SUT1) to the front (above window SUT1). So the next commands will remain to window SUT1 (because it is still the frontmost window).
So for the moment, we first must disconnect the SUT wich is in the front, so the next commands apply to the next/correct SUT.

When a SUT is not connected, then a ‘connect “SUTname2”’ will connect and bring also the new window over the old window.

What a little thing we missing?

Oh, i see now, the commands after the ‘connect “SUTxy”’ go to the right SUT, even though the window himself is behind the other SUT-window! :oops:

Is there a trick to change the both SUT-windows anyway (so always the SUT-window wich get the actual commands is in the front.)?

The easiest thing is you could do a show remoteWindow after your connect command. (or a hide remoteWindow before the connect to hide the old one).

But you are correct, regardless of which (if any) window is shown the commands go to the SUT which was last “connected”.

So cool, Jonathan, ‘show remoteWindow’/‘hide remoteWindow’ is/are the command(s) that we searched for! Great! :idea:

Now we can ‘connect’ the other SUT and then ‘show’ its window. So we can see what we enter to this SUT :wink:

Thankyou! Greetings from switzerland! :smiley: