Run Vusers in an interactive RDP session

You can set up load generators to run Vusers in an interactive Remote Desktop Protocol session, while the LoadRunner Agent runs as a service.

Back to top

About interactive RDP sessions

Some GUI protocols, for example, SAP GUI or Citrix, require the agent to run as a process. However, this requires the user to manually log into each load generator to run the test. To avoid this limitation, LoadRunner Professional enables you to run Vusers in an interactive RDP session on the load generator.

When running an interactive RDP session, the agent is run as a service, but LoadRunner Professional is able to open a new interactive session on the load generator machine without the user being involved.

To enable this, you configure a user with RDP permissions in the agent runtime settings. When Controller connects to that load generator (while in RDP mode), a new interactive RDP session is started via FreeRDP. No user intervention is required on the load generator machine to run the Vusers for GUI-based protocol scripts.

Note: Windows operating systems generally allow only one active interactive session, so you will not be able to “see” the new session when it's opened, or check its parameters.

Note the following functionality for opening and closing sessions:

  • When you click Connect in the Load Generators dialog box, if Controller detects that there is a session open using the same user RDP credentials (this may be via the standard Windows Remote Desktop Connection), it logs off that user. This terminates the session, then Controller creates a new one.
  • To end the interactive session, if you are connected to the load generator machine from Controller (status shows Ready state), you can click the Disconnect button in the Load Generators dialog box. This will log off the user, not just disconnect.

Back to top

Steps for setting up an interactive RDP session

The following steps are required to use interactive RDP sessions on a load generator

Tip: Check out the Notes and limitations before starting.

  1. Install Microsoft Media Feature Pack (if it is not installed by default) on the load generator. You can download the Media Feature Pack from the Microsoft Download Center.

    The Media Feature Pack is required to ensure that FreeRDP has all the necessary codecs to render the remote desktop session.

  2. Configure features for running the media pack. See Enable media features and RDP parameters.
  3. Define RDP user credentials for the LoadRunner Agent. See Configure the LoadRunner Agent account.
  4. Enable RDP mode on the Controller machine. See Enable RDP mode.
  5. Click Connect in the Load Generators dialog box.

Back to top

Enable media features and RDP parameters

Perform the following on the load generator machine, to enable media features on your Windows operating system.

We recommend configuring RDP timeout policies, to remove the time limits for RDP sessions. This prevents sessions being disconnected before the performance test has finished.

To configure Windows Desktop:

  1. Select Control Panel > Programs > Programs and Features > Turn Windows features on or off. This opens the list of Windows features.
  2.  Scroll down and select Media Features.

  3.  Click OK, and wait until Windows turns on Windows Media Player and other media features.

To configure Windows Server:

  1. Select Start > Server Manager.
  2. In Server Manager, select Manage > Add Roles and Features. Click Next until the Features page is displayed.
  3. On the Features page, select Media Foundation.
  4. Assign permissions to allow the agent to be configured in the Remote Desktop Users group.  

    1. Open the Group Policy Management Editor, focused on an appropriate Group Policy object.
    2. Navigate to the Computer Configuration\Policies\Windows Settings\Security Settings\Local Policies and select the User Rights Assignment node.

    3. The agent should be run with User in the Remote Desktop Users group. If Remote Desktop Users group is not listed in the policy, click Add User or Group and add it manually. By default, Remote Desktop Users are allowed to log on through Remote Desktop Services.

  5. Set RDP timeout policies:

    1. Open the Local Group Policy Editor for the specific users.
    2. Navigate to User Configuration > Administrative Templates > Windows Components > Remote Desktop Services > Remote Desktop Session Host > Session Time Limits.

    3. In the right pane, right-click Set time limit for active Remote Desktop Services sessions and click Edit.

    4. Select either Not Configured or Disabled.

    5. Repeat for the End session when time limits are reached policy.

Back to top

Configure the LoadRunner Agent account

To configure the LoadRunner Agent account:

  1. On the LoadRunner Agent machine, select Micro Focus > Agent Runtime Settings Configuration

  2. Enter the credentials of a user with RDP permissions.

    Note: The defined user must be able to connect to the machine via the standard Remote Desktop Connection log in.

  3. Click OK.

Back to top

Enable RDP mode

To enable RDP mode:

  1. On the Controller machine, click the Load Generators button to open the Load Generators dialog box.
  2. Click Details and select the Load Generator Information > Terminal Services tab.
  3. Select the Enable Remote Desktop Protocol check box.
  4. Select the required color depth and resolution, to match the settings where the script was recorded.

    This information is saved in the scenario file, and the new session will receive (via command line parameters) the selected resolution and color depth.

  5. Click OK.

Back to top

Notes and limitations

This section lists several issues relating to RDP interactive sessions.

  • RDP mode is not supported for a local system user account. While a performance test with a system account will run for a load generator set to RDP mode, it will not open an interactive RDP session.

  • If the LoadRunner Agent is running as a process, you must kill the process (magentproc.exe).

  • Local accounts on domain machines cannot be used to run the LoadRunner Agent.

  • When you log off an RDP user session running a LoadRunner Agent, it will terminate FreeRDP.
  • If the Windows OS on the load generator allows only one active session: When another user is connected, FreeRDP will force disconnect that session (not log off), and log in with the user setup in the LoadRunner Agent runtime settings. ​

  • Makes sure you use the default RDP port, 3389, when running Vusers in an interactive RDP session.

  • RDP mode is not supported when a LoadRunner Professional host is used simultaneously as a Controller and load generator.

  • RDP mode is not supported with IP Spoofing.

  • RDP mode is not supported with Docker.

Back to top

See also: