Opening User Sessions on Remote Computers

Applies to TestComplete 15.47, last modified on January 20, 2023
The Network Suite functionality is deprecated. We don’t recommend using it for distributed testing. Consider using a CI/CD system for managing distributed tests. See Migrating Distributed Tests to CI/CD Systems for details. In case you need to run web tests on multiple environments in parallel, you can also try using your project’s Execution Plan.

To perform necessary operations on a remote computer (for example, to work with the GUI of a remote instance of the application under test), the TestComplete network suite requires an open user session on that computer.

You can configure the network suite to open user sessions on remote computers automatically when you run tests on them, or you can open user sessions on remote computers manually.

To control how user sessions should be opened on hosts, in the Hosts editor of your master project, set the needed Login Mode for your hosts. The following login modes are supported:

  • Manual

  • Automatic (RDP Session)

  • Automatic (Console Session)

You can also set the needed login mode in tests by using the LogonMode property of the Host object.

Specifying User Accounts for Remote Hosts

Regardless of whether you will open user sessions automatically or manually, each remote host configured in the master project must have a user account specified. The network suite will run tests on the hosts under those accounts.

You can specify an individual user account for each host or a common user account to use on all hosts.

The user accounts must belong to the Remote Desktop Users group on the remote computers. See Distributed Testing - Requirements.
To specify an individual user account for a host
  • Open your master project in TestComplete.

  • In the Project Explorer, double-click the NetworkSuite | Hosts item. The Hosts editor will open.

  • Find the needed host in the list and enter the user name, password and domain name in the appropriate columns.

    Tips:

    • To use the host’s local user account rather than a domain account, enter the host name as the domain name (recommended). You can also leave the domain name in the Hosts editor blank (the domain name in the network suite properties should be blank as well). In this case, the domain name is automatically specified as the host name.

    • If the user accounts you set for hosts belong to the same domain, you can set a default domain name to use throughout your master project and leave the domain name in the Hosts editor blank. Likewise, you can set common user names and passwords.

  • Select File | Save from the TestComplete main menu to save the changes.

To specify a default user account for all hosts in the project
  • Open your master project in TestComplete.

  • In the Project Explorer, double-click the NetworkSuite project item. TestComplete will open the Properties page of the Network Suite editor.

  • In the Credentials section, enter the needed user name, password and domain name.

    TestComplete will use that user account to open user sessions on all hosts for which no user account data is specified in the Hosts editor.

  • Select File | Save from the TestComplete main menu to save the changes.

Opening User Sessions Automatically

To configure TestComplete to open user sessions on remote hosts automatically:

  • In the Hosts editor of your master project, enter user account data for the needed hosts.

  • Set one of automatic login modes for the hosts:

    • Automatic (RDP Session). The host will be locked during the network suite run and will remain locked even after the test run is over.

    • Automatic (Console Session). TestComplete will retarget the remote desktop session to the remote host’s console and the host will remain unlocked.

      This may reduce the host’s system security.

When you verify or run the network suite, it automatically opens user sessions on remote computers using the provided credentials.

Notes:

  • In automatic mode, the existing user session will be logged off, and a new session will be created. The existing user session is used only in Manual mode.

  • If you have an open session for another user, TestComplete will not be able to open a new session for the needed user (unless you use a server edition of the Windows operating system). Close the currently open session on the remote computer and open a new one for the needed user.

  • If the remote computer is running a server edition of the Windows operating system and several active sessions are open on that computer, the network suite will close all those sessions and open a new session for the needed user.

    To keep those sessions open, set the login mode for the appropriate host to Manual and open user sessions for the needed user on that host manually before running tests.

Opening User Sessions Manually

You can open a user session for the needed user account on a remote computer manually.

Before running a network suite:

  • Connect to the remote computer and open a user session for the needed user account on it.

  • In the Hosts editor of your master project, set the host’s Login Mode to Manual.

  • Enter the credentials of the user account for the needed hosts.

When you start the network suite, TestComplete will not open a new session on the host. It will connect to the existing session to run tests.

Opening User Sessions by Using Microsoft Accounts

A Microsoft account (former Windows Live ID) is an email address you use to connect to various Microsoft services, like OneDrive or Outlook.

Currently, a network suite cannot open user sessions on remote computers by using Microsoft accounts.

As a workaround, you can do any of the following:

  • Create a local account on a remote host and use it to open user sessions to run tests on that host:

    1. Log in to the remote computer. Make sure that the account under which you log in has administrator privileges.

    2. On the PC settings screen, select Users and then click Add a user.

    3. Click Sign in without a Microsoft account and then click Local account.

    4. Enter the user name and password for the new account.

      The password for a new account cannot be blank.
    5. Click Next and then click Finish.

    6. Configure the network suite to use the created account to open user sessions on the remote computer.

– or –

  • Find a local user name associated with your Microsoft account on the remote host and use it to run tests:

    1. Log in to the remote computer.

    2. Type mmc in the search box and press Enter.

    3. In Microsoft Management Console, open the Local Users and Groups snap-in.

    4. In the left pane of the console, select the Users group.

    5. The pane in the centre of the console will show a list of user accounts registered on that host.

    6. Find the needed Microsoft account. The Name column contains the local user account name associated with the Microsoft account.

      Local account associated with the Microsoft account

      Click the image to enlarge it.

    7. Configure the network suite to use that local account to open user sessions on the remote computer.

See Also

Creating and Running Distributed Tests
Distributed Testing
Projects Participating in Distributed Testing
Running the Network Suite, Jobs and Tasks
Verifying Tasks, Jobs, Hosts and Network Suites
Editing Host Properties

Highlight search results