The UFT Connection Agent for Mac computers

What is the UFT Connection Agent?

The UFT Connection Agent is a service installed on your Apple Mac computer, which enables UFT to communicate with the Safari browser using the WebSockets protocol. This enables UFT to run tests on Web applications running in Safari on the Mac and to spy on objects in these applications.

When you install the UFT Connection Agent, the agent service is installed on your Mac, and the Unified Functional Testing Agent extension is installed on the Apple Safari browser.

The UFT Connection Agent runs automatically after installation and after each restart of the Mac and communicates with UFT on the one hand and the Unified Functional Testing Agent Safari extension on the other.

If you previously used UFT 12.00 to test Web applications on Safari, then after you upgrade UFT you must reinstall the UFT Connection Agent on the Mac from the current UFT version.

The UFT Connection Agent preferences and the Unified Functional Testing Agent Safari extension preferences are reset to their defaults.

If you want to use non-default preferences, for example, if you configured UFT to use a port other than the default 8822 for remote connections, then you must reconfigure these preferences on the Mac computer.

This is required because of significant changes in the UFT Connection Agent's preferences. For example, the UFT Connection Agent now uses different ports to communicate with UFT and the Safari extension. In UFT 12.00, the same port was used for both communications.

Back to top

How do I configure the Mac to test Web applications?

By default, you do not need to modify the preferences set for the UFT Connection Agent and the Unified Functional Testing Agent extension.

  • UFT and the connection agent communicate using port 8822

  • The connection agent and the UFT Safari extension communicate using port 8823.

However, in some situations, you might want to specify different ports. For example:

  • If another application on the Mac uses these ports.

  • If multiple UFT users need to connect to the same Mac computer. Each UFT user can use a connection agent installed under a different Mac user account, with a different port number configured.

Caution: If you modify the port numbers, make sure that:

  • The UFT port defined in the UFT Connection Agent preferences matches the one defined in UFT.

    For details on setting this in UFT, see Connect to a remote Mac computer.

  • The Safari port defined in the UFT Connection Agent preferences matches the one defined in the Unified Functional Testing Agent extension in Safari.

In addition to the port numbers, you can configure the level of log messages to collect. By default, log messages are collected from the connection agent, but not the Safari extension.

Can you have multiple connections to the Mac computer?

Yes.

  • Multiple users from different UFT instances can connect to the same Mac simultaneously using different ports.

    Each user must install the UFT Connection Agent and UFT Safari extension in their Mac user account, and configure the relevant port number in UFT, in the connection agent on the Mac.

  • The Mac connection information is in the Record and Run settings, which are defined per test, therefore you can connect to different Macs or different ports when running different tests.

    However, UFT can connect to only one Mac at any time.

UFT attempts to set up a remote connection using the RemoteConnection.Connect method, but... Result

... it is already connected to the same Mac and port with the same security level.

The existing connection is used and a statement about this is added to the test results.

... it is already connected using a different Mac, port, or security level.

A run error occurs on the Connect step
UFT attempts to set up a remote connection using the Record and Run settings, but... Result

... it is already connected with the same security level or higher (to the same Mac and port, or different ones).

This means UFT initiates a connection without SSL, or it is initiating an SSL connection and the existing connection is also using SSL.

The existing connection is used and a warning is added to the test results.

This may lead to a situation where steps that were to be carried out on the new connection on a different Mac or port, are carried out on the existing one.

... it is already connected with a lower security level (to the same Mac and port, or different ones).

This means UFT initiates an SSL connection but the existing connection is not using SSL.

The existing connection is closed and a new connection is initiated. (The new connection can succeed only if the UFT Connection Agent on the Mac is also set up to require an SSL connection.)

Notifications about the connection changes are added to the test results.

This behavior prevents communication intended for a secure connection from being carried out on a non-secured connection.

How Do I secure the communication with the Mac computer?

When UFT communicates with the Mac, UFT acts as a client and the UFT Connection Agent acts as a server.

You can secure this communication on different levels:

  1. You can set up client authentication by defining a passphrase for UFT to use when contacting the Mac.

  2. You can secure the communication between UFT and the UFT Connection Agent by requiring that they use an SSL connection.

For more details, see Securing the communication with the remote Mac computer

For task details on configuring the UFT Connection Agent preferences, the Unified Functional Testing Agent Safari extension preferences, and the security settings, see Configure the UFT Connection Agent preferences.