UFT Mobile Architecture
UFT Mobile is a standalone server that provides mobile device access to different test applications. UFT Mobile supports a distributed architecture where different test clients can all interact with the same UFT Mobile server instance.
In the diagram below, you can see the individual components of UFT Mobile and the relationship between them.
The UFT Mobile environment consists of the following components:
|UFT Mobile Server||
This is a single web server that:
External PostgreSQL database
You can choose to connect UFT Mobile to an existing external PostgreSQL database. This allows your organization to manage and utilize existing DB resources.
When you install the UFT Mobile server, both the server and a connector are installed. The connector is designed as a lightweight piece of software for connecting devices to UFT Mobile that can also be installed as a standalone component. You can install the connector on multiple machines in distributed locations, or on your testing-tool machine. The connector can be installed on a Windows, Linux, or Mac machine. For more details, see Install the connector on a Windows machine, Install the connector on a Linux machine, or Install the connector on a Mac Machine.
The connector manages the physical USB connection to the device, and the logical state machine on top of it. It maps the ports to connect to the device over USB and manages the remote screen viewer stream from the device to the tool. It receives lifecycle events from the USB library such as device connected or device disconnected, agent finished installing, and agent started. It transfers these events to the UFT Mobile server for adding the device to the pool. The connector is also responsible for installing and uninstalling apps on the device.
Test devices accessed via connectors
These are the devices (smartphones/tablets) on which the tests are run. The following applications are copied to the test devices:
|SV Lab||SV (Service Virtualization) Lab is an environment virtualization toolkit for virtualing real services in areas that would be otherwise difficult to test. The SV Lab is deployed inside UFT Mobile, ready to run Service Virtualization simulations.|
NV Test Manager
Network Virtualization is an optional component for testing apps running under different network conditions. Network virtualization emulates real-world conditions by imposing impairments and constraints in your testing environment during the software testing process, thereby improving software testing accuracy.
The connector is a lightweight piece of software that is installed on the UFT Mobile server machine as part of the installation process, and is automatically configured to work with the local server. The connector can also be installed as a standalone component on a different machine, such as that of a developer or testing engineer. Usually, a combination of the following scenarios is used:
|Central device hub||A central lab of devices connected to the connector on the UFT Mobileserver machine.||Efficiency. Avoids duplication of tasks for setting up and managing devices.|
|Distributed device hubs||Connectors installed on machines in multiple locations (on-site/off-site/globally dispersed).||
Scalable. New labs can be added as needed.
|Bring your own device||Connector installed on a developer's/testing engineer's machine.||
Supports hands-on testing of the app on the device.
In the diagram below you can see a more drilled-down view, with a focus on the physical deployment of a UFT Mobile server. The different protocols and the ports used are also shown.
Client tools and UFT Mobile server connectivity
Common client tools are UFT, LoadRunner, Sprinter, BPM, UFT Developer, and Appium scripts.
Testing-tool clients connect to the UFT Mobile server for the following:
- A user interface (UI) for managing devices and uploading apps over HTTP/HTTPS.
- API (JSON commands) for tests and management, sent over WebSocket (WS).
- The remote screen viewer client.
UFT Mobile server and connector connectivity
The connector establishes a WebSocket (WS) connection with the UFT Mobile server, allowing two-way asynchronous communication from the connector to the server, and vice versa, on the same socket. API calls and files are passed over WS.
Testing tool, connector, and device connectivity
The connector maps a port forward to the mobile device for communication of API traffic using mobile libraries (Android Debug Bridge (ADB), Mobile Device Library). It also opens a Windows Sockets connection to the agent. The connector maps a port forward for the remote screen viewer. The connector exposes the remote screen viewer directly to the tool for minimum latency when operating the device remotely. The UFT Mobile Agent on the device listens on a Windows Sockets port.
The diagam below shows displays a UFT Mobile active-passive high availability environment:
Note that both servers should always be up and running. One of the servers marks itself as active, and the other as passive. The load balancer redirects all requests to the active server. When the active server fails, the passive server because active, and the load balancer starts redirecting all requests to it. Make sure to monitor and restart the failed server, so that it becomes passive.
The diagram below displays a deployment with hosted devices.
UFT Mobile allows you to work with the cloud-based Amazon Device Farm, to run tests on a large variety of devices.
In the diagram below, you can see a how the UFT Mobile connector interfaces with the AWS Device Farm.
For details on how to set up UFT Mobile for this integration, see AWS Device Farm integration.