Skip to main content
Version: 23.5

Switching SUTs During a Test

Often, a test needs to validate that a change made on a different system. For example, updating something via a phone-based application requires validating that in a desktop client application.

A single Eggplant Functional script can switch between systems under test (SUTs) very easily using the Connect command. The Connect command allows you to connect to another SUT during a script run.

Example:

// Perform actions on SUT 1:
TypeText "email@address.com", return -- Performs actions on existing connection
Click "SubmitButton" -- This submits a form
connect IP.ADDRESS.TO.SUT -- The saved name of the SUT from the Connection List can also be used
# Perform actions on SUT2 -- These actions might check that the submitted form has been received \{#perform-actions-on-sut2----these-actions-might-check-that-the-submitted-form-has-been-received}
// Re-connect to SUT 1:
TypeText "email2@address.com", return -- The saved name of the SUT from the Connection List can also be used.
Click "SubmitButton" -- Submit a second form

You can switch back and forth between SUTs as much as you need.