RDP Agent (for Microsoft Terminal Server) overview

The Agent for Microsoft Terminal Server is an optional utility that you can install on the RDP server. It provides enhancements to the normal RDP functionality. It is provided in the LoadRunner Professional installation package and you can install it on any RDP server. The agent provides you with more intuitive and readable scripts, built-in synchronization, and detailed information about relevant objects. Note that when you run RDP Vusers with the agent installed, each Vuser runs its own process of lrrdpagent.exe. This results in a slight reduction in the number of Vusers that can run on the server machine.

Tips for using the Agent for Microsoft Terminal Server

  • When opening application menus (for example, File or Edit) with the mouse, sync steps may fail. To avoid this issue, use the keyboard to select menu items when recording.

  • When you add a rdp_sync_object_mouse_click step manually, the coordinates given are absolute coordinates (relating to the entire screen). To create the synchronization point, you need to calculate the offset in the window (relative coordinates) of the desired click location and modify the absolute coordinates accordingly for the synchronization to successfully replay.

  • If a synchronization object exists at the correct location and time during replay, but is covered by another window (such as a pop-up), then the synchronization step will pass and a click will be executed on the window which is covering the synchronization point, and therefore harm the script flow.

  • During recording, if you want to return the application window to the foreground, either click on the title bar, or use the keyboard (ALT+TAB). Note that if you click inside the application window to return it to the foreground, the RDP session may terminate unexpectedly.

Back to top

Enhancements to RDP functionality

The Agent for Microsoft Terminal Server provides the following enhancements to the normal RDP functionality:

Resumed Sessions

The RDP Agent process is always active on the server machine. This allows you to record a resumed RDP session on a machine with the RDP agent—you do not need to start a new one.

Object Detail Recording

When the Agent for Microsoft Terminal Server is installed, VuGen can record specific information about the object that is being used instead of general information about the action. For example, VuGen generates rdp_sync_object_mouse_click and rdp_sync_object_mouse_double_click steps instead of rdp_mouse_click and rdp_mouse_double_click that it generates without the agent.

The following example shows a double-mouse-click action recorded with and without the agent installation. Note that with the agent, VuGen generates sync_object functions for all of the mouse actions.

rdp_sync_object_mouse_double_click("StepDescription=Mouse Double Click on Synchronized Object 1", 
rdp_mouse_double_click("StepDescription=Mouse Double Click 1", 

Expanded Right-Click Menu

When you click within a snapshot, you can insert several functions into the script using the right-click menu. When the agent is not active, you are limited to inserting only rdp_mouse_click, rdp_mouse_double_click, and rdp_sync_on_image steps. When the agent is installed, you are able to insert all possible steps that involve the RDP agent:

  • rdp_get_object_info and rdp_sync_on_object_info. Provide information about the state of the object, and synchronize on a specific object property such as: ENABLED, FOCUSED, CONTROL_ID, ITEM_TEXT, TEXT, CHECKED, and LINES.
  • rdp_sync_on_text and rdp_get_text.

For details on the above functions, see the Function Reference (select the relevant version).

In the following example, the rdp_sync_on_object_info function provides synchronization by waiting for the Internet Options dialog box to come into focus.

rdp_sync_on_object_info("StepDescription=Sync on Object Info 0", 
        "WindowTitle=Internet Options", 
Back to top